Code: Select all
var := true
Hotkey if, winexist("ahk_exe Explorer.EXE") and (var)
Hotkey F2, on
return
#if winexist("ahk_exe Explorer.EXE") and (var)
F2:: msgbox yes
#if
*Esc:: ExitApp
fixed it by changing 'and' to '&&', but can't we use 'and'?