Instantly share code, notes, and snippets.

Embed
What would you like to do?
Switch between Instantbird and any other program with a hotkey
#singleinstance force
#noenv
;directives
coordmode, mouse, screen ;set mouse to get coords from screen
settitlematchmode 2
;-------------------------------------------------------------------
;variables for the Instantbird focuser
instantbird := " - Instantbird" ;the title of the typing window is something like "Name of Person - Instantbird" --I confirm that the " - " is always in the title, complete with the two spaces on either side of the hyphen.
curwin := ""
lastwin := ""
;-------------------------------------------------------------------
;hotkey control+space
^space::InstantbirdFocuser()
InstantbirdFocuser(){
global
WinGetActiveTitle, curwin
IfInString, curwin, %instantbird%
{
winactivate, %lastwin%
lastwin := curwin
}else{
lastwin := curwin
winactivate, %instantbird%
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment