Function Reference


WinWaitClose

Pauses execution of the script until the requested window does not exist.

WinWaitClose ( "title" [, "text" [, timeout = 0]] )

Parameters

title The title/hWnd/class of the window to check. See Title special definition.
text [optional] The text of the window to check. Default is an empty string. See Text special definition.
timeout [optional] Timeout in seconds if the window is not closed. Default is 0 (no timeout).

Return Value

Success: 1.
Failure: 0 if timeout occurred.

Remarks

If the window already doesn't exist when this function is called it will return 1 immediately. The window is polled every 250 milliseconds or so.

Related

ProcessWaitClose, WinActive, WinExists, WinWait, WinWaitActive, WinWaitDelay (Option), WinWaitNotActive

Example

; Wait for the window "[CLASS:Notepad]" to not exist.
WinWaitClose("[CLASS:Notepad]")

; Wait a maximum of 5 seconds for "[CLASS:Notepad]" to not exist.
WinWaitClose("[CLASS:Notepad]", "", 5)