'Is it ok to turn off `#IfWin` context sensitivity with `#If`?
Quoting from #IfWinActive / #IfWinNotActive / #IfWinExist / #IfWinNotExist :
To turn off context-sensitivity, specify any #IfWin directive but omit all of its parameters. For example:
#IfWinActive
Do we have to use #IfWin to close #IfWin? I found that #If seems to do the job as well, but it's not documented.
If you're curious why I'd like to close #IfWin with #If, that's because my code is like the following:
#IfWinActive ahk_exe App.exe
#c::
Esc::WinClose
#If WinExist("ahk_exe App.exe")
#c::WinActivate ahk_exe App.exe
#If
#c::Call("App.exe")
#If
So it makes more sense to use #If to close.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
