Function Reference


WinWait

Pauses execution of the script until the requested window exists.

WinWait ( "title" [, "text" [, timeout]] )

Parameters

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

Return Value

Success: Returns handle to the requested window.
Failure: Returns 0 if timeout occurred.

Remarks

None.

Related

WinActive, WinExists, WinWaitActive, WinWaitClose, WinWaitNotActive, WinWaitDelay (Option), ProcessWait

Example


;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)