Switch between Instantbird and any other program with a hotkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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