<if_win> Window-related condition.

Command Tree: | Macro Flow Control \ If-Else \ If Window
. |
Syntax: | <if_win>("WinTitle", "Condition", Match)
WinTitle | Title of the window to check against the Condition.
Condition | Condition can be one from the following: "OPEN" - the <if_win> statement is true if window with the WinTitle is opened (exist). "CLOSE" - the <if_win> statement is true if window with the WinTitle is not opened (no more exist). "ACT" - the <if_win> statement is true if window with the WinTitle is active (top most, receives keyboard events). "NOACT" - the <if_win> statement is true if window with the WinTitle is not active (not receives keyboard events).
Match | If 1, WinTitle must exactly match a window title. If 0, WinTitle can be a substring of a window title.
. |
. |
Example: | <#> This macro shows how to use if-win command <#> <commands_only_on> <if_win>("notepad","OPEN",0) <if_win>("Notepad","ACT",0) <msg>(100,100,"Notepad is opened and active.","Message",1) <else> <msg>(100,100,"Notepad is opened but not active.","Message",1) <endif> <else> <msg>(100,100,"Notepad is not opened.","Message",1) <endif>