By using this site you agree to the use of cookies.

Learn more

Share via:


AutoIt WinWait Function

Function to pause the execution of the script until a specified window exists.

Edited: 2017-07-26 10:30

The WinWait function can be used to make the script pause, until a specified window opens. Useful if the execution of your script depends on a specific program running.

The check is performed around every 250 milliseconds.


titleTitle, hWnd or class of the window to check.
textOptional. Text to check for.
timeoutOptional. The timeout is in seconds.

WinWait Example

The following script will wait for 20 seconds, to see if notepad opens, and close it if it dose, but exit if it doesn't.


WinWait("[CLASS:Notepad]", "", 10)