Skip to content

Instantly share code, notes, and snippets.

@BGMcoder
Created December 13, 2017 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BGMcoder/21727b096808a3f3549805aaf6cf4648 to your computer and use it in GitHub Desktop.
Save BGMcoder/21727b096808a3f3549805aaf6cf4648 to your computer and use it in GitHub Desktop.
PhonerLite Toggler: hides/shows/runs PhonerLite. Attach this to a hotkey.
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