|
Wait for Window Action |
Declaration |
<AMWAITFORWINDOW WINDOWTITLE="text" WINDOWCLASS="text" WINDOWHANDLE="number" HIDDENWINDOW="yes/no" TIMEOUT="number"> |
See Also |
Wait for Pointer, Wait for Pixel, Wait for File, Wait for Process, Close Window |
Causes task execution to pause at the current line until the specified window opens or closes.
Commonly used to wait for a (external application generated) dialog box or window to appear or disappear that would indicate process has completed successfully. If the dialog appeared then the task could move on - otherwise it should fail. For example if automating a report printing process after the keystrokes are sent to start the report generation, the Wait for Window action could be used to wait until the dialog box "Report Complete" appears before performing further processing.
Specifies whether to wait for the Window to open or close.
Specifies the title of the Window that AutoMate should wait for. For convenience, In visual mode, a dropdown list is provided showing the titles of windows that are currently open on the system. This parameter supports wildcards (* and ?), for example "*Internet Explorer* would include all Windows containing that text. Note: If this parameter is left blank the action assumes it is searching for a Window title that is blank - to ignore the WIndow title, use *.
Specifies the class of the Window to wait for. The value is case-insensitive. This parameter supports wildcards (* and ?), for example "*Internet Explorer* would include all Windows classes containing that text. Note: If this parameter is left blank the action assumes it is searching for a Window class that is blank - to ignore the WIndow class, use *.
Specifies the handle of the Window to wait for. If set to 0 or omitted the parameter is ignored.
Specifies whether hidden Windows should be assumed to be open (in which case the action would wait for the Window to actually be closed). If no, an invisible Window is considered closed and a visible Window is considered open. Checking this option also changes the dropdown display in visual mode.
Specifies the number of minutes or seconds to Wait before failing.
Specifies the unit of time that should be used for the timeout value (if any). Can be either "minutes" or "seconds".
Standard Error Handling Options
This action also includes the standard "Error Causes" and
"On Error" failure handling options/tabs
More on Error Handling Options
Variables and Expressions
All text fields allow the use of expressions by surrounding the
expression in percentage signs (example: %MYVARIABLE%,
%Left('Text',2)%). To help construct these expressions, a popup
expression builder is available in all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...
<AMWAITFORWINDOW WINDOWTITLE="Microsoft Internet Explorer">
<AMWAITFORWINDOW ACTION="close" WINDOWTITLE="AutoMate Discussion Forum - Microsoft Internet Explorer" MATCHTITLE="YES">
<AMWAITFORWINDOW WINDOWTITLE="AcrobatTrayIcon" HIDDENWINDOW="YES">
<AMWAITFORWINDOW WINDOWTITLE="AcrobatTrayIcon" HIDDENWINDOW="YES" TIMEOUT="5" MEASURE="minutes">