WinWaitExist

Waits for a window to exist.

Syntax:

WinWaitExist(partial-winname, timeout)

Parameters:

(s) partial-winname the initial part of, or an entire, window name.

(i) timeout the number of seconds to wait (maximum = 86400). Specify 0 to return immediately (no wait).  Specify -1 for no timeout (wait forever).

Returns:

(s) @TRUE if the window appeared; @FALSE if it didn't.

 

Note: This function has a built in ½ second time delay. This can be modified by the function
IntControl (70, p1, 0, 0, 0)

Example:

DirChange(DirWindows(0))
Run("notepad.exe", "")
WinWaitExist("~Notepad", 5)
TimeDelay(1)
SendMenusTo("~Notepad", "File Open")
SendKeysTo("File Open", "c:\config.sys~")

See Also:

AppWaitClose, TimeDelay, RunWait, WinExist, WinWaitChild, WinWaitClose, IntControl 70, Partial Window Names