Method WinWaitClose

AutoIt X

Method Reference


WinWaitClose

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

WinWaitClose "title" [, "text" [, timeout]]

Parameters

title The title of the window to check.
text Optional: The text of the window to check.
timeout Optional: Timeout in seconds

Return Value

Success: Returns 1.
Failure: Returns 0 if timeout occurred.

Remarks

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

Related

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

Example


Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

'Wait for the window "Untitled" to not exist
oAutoIt.WinWaitClose "Untitled"

'Wait a maximum of 5 seconds for "Untitled" to not exist
oAutoIt.WinWaitClose "Untitled", "", 5