help making an app the active window
Posted: 10 May 2024, 13:48
Having trouble using a hotkey to make an app the active window. Sometimes it works, sometimes it doesn't.
But if I change from WinActivate to MsgBox, this works reliably. So AHK is finding the process, but can't reliably activate it.
Any suggestions?
Code: Select all
^j:: ;make Joplin active
IfWinExist, ahk_exe Joplin.exe
WinActivate, ahk_exe Joplin.exe
Sleep, 200
return
Code: Select all
^j:: ;make Joplin active
IfWinExist, ahk_exe Joplin.exe
MsgBox, Joplin is running!
Sleep, 200
return