Open/Close the current programm with one key
Hello! Please help me, I can't find the solution to my problem. How to make Open/Collapse the window of a certain application (e.g. Microsoft Word) with one hotkey. Thank you very much!
Try this (Type: Command):
Code: Select all
PName:="ahk_exe WINWORD.EXE" ;find the process name using Window Information Tool
if(WinExist(PName))
if(WinActive(PName))
WinMinimize, %PName%
else
WinActivate, %PName%
else
run, winword ;full path to the program
return
Super, everything works! Thank you!Tom wrote: ↑Dec 20th, ’20, 10:50 Try this (Type: Command):Code: Select all
PName:="ahk_exe WINWORD.EXE" ;find the process name using Window Information Tool if(WinExist(PName)) if(WinActive(PName)) WinMinimize, %PName% else WinActivate, %PName% else run, winword ;full path to the program return