Wait for a window to be displayed
See Window synchronization to wait until a specific window is displayed.
See OnAction function to make a specific action every time a window is displayed (Not available in WinTask Lite).
Example
When you download a file from an url, the file download takes a while, and you have to wait for the window which tells Download complete and then click the OK button. The window synchronization wizard (Menu Insert/Synchronization/On Window) can be used to generate this code:
StartBrowser("IE", "www.wintask.com/wintaskdemo.exe")Pause 600 secs until
WinStatus(Active,Exact)
InWindow("IEXPLORE.EXE|#32770|Download complete",1)
PauseFalse
MsgBox("'Wait for' at line " + #ErrorLine$ + " has failed !")
End
EndPause
UseWindow("IEXPLORE.EXE|#32770|Download complete",1)
Click(Button,"Close")