Created
December 13, 2017 20:33
-
-
Save BGMcoder/21727b096808a3f3549805aaf6cf4648 to your computer and use it in GitHub Desktop.
PhonerLite Toggler: hides/shows/runs PhonerLite. Attach this to 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
phonerlite(){ | |
phonerliteapp := "C:\Program Files (x86)\Phoner\PhonerLite.exe" | |
process, exist, PhonerLite.exe | |
thispid := errorlevel | |
if(thispid){ | |
;if PhonerLite window is open on the screen, then minimize it | |
wingettitle, thistitle, ahk_pid %thispid% | |
if(thistitle){ | |
winminimize, ahk_pid %thispid% | |
}else{ | |
;if PhonerLite is minimized, then bring it to the front | |
run, %phonerliteapp% | |
} | |
;if it isn't running, then start the program | |
}else{ | |
run, %phonerliteapp% | |
} | |
return thispid | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment