Pauses execution of the script until the requested window exists.
WinWait ( "title" [, "text" [, timeout]] )
| title | The title of the window to check. See Title special definition. |
| text | [optional] The text of the window to check. |
| timeout | [optional] Timeout in seconds |
| Success: | Returns handle to the requested window. |
| Failure: | Returns 0 if timeout occurred. |
;Wait for the window "[CLASS:Notepad]" to exist
Run("notepad.exe")
WinWait("[CLASS:Notepad]")
;Wait a maximum of 5 seconds for "[CLASS:Notepad]" to exist
WinWait("[CLASS:Notepad]", "", 5)