WinWait

From AutoIt Wiki

Jump to: navigation, search

Pauses execution of the script until the requested window exists.

Contents

Syntax

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

Parameters

title The title of the window to check. See <a href="../intro/windowsadvanced.htm">Title special definition</a>.
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.

Example

;Wait for the window "Untitled" to exist
Run("notepad")
WinWait("Untitled")
;Wait a maximum of 5 seconds for "Untitled" to exist
WinWait("Untitled", "", 5)

Related Functions

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

Personal tools