I encountered a problem when the hotkey was only started when the script's own window was active.
I found that #IfWinActive does not support %Var%. How to solve it?
If the script is run again and no ahk_pid %pid% is added, does the hotkey conflict between the two processes?
Code: Select all
#SingleInstance Off Gui, Show, h300 w400, TEST Process, Exist pid := ErrorLevel return #IfWinActive TEST ahk_pid %pid% ; Error here Enter::MsgBox OK return