WinWaitChild

Waits for a child window to exist.

Syntax:

WinWaitChild(partial parent winname, partial child winname, timeout)

Parameters:

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

(s) partial child winname the initial part of, or an entire child 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:

Run(StrCat(DirHome(),"winbatch studio.exe"),"")
WinWaitExist("WinBatch Studio", 5)
TimeDelay(1)
SendMenusTo("WinBatch Studio", "File Open")
SendKeysTo("Open", "c:\config.sys{enter}")
ret = WinWaitChild("WinBatch Studio", "c:\CONFIG.SYS", 5)
If ret == @TRUE
   Message("Notice","Child window found")
Else
   Message("Notice","Child window found")
EndIf
See Also:

AppWaitClose, IntControl 70, TimeDelay, RunWait, WinExist, WinExistChild, WinWaitClose, WinWaitExist, Partial Window Names