Wait for Window

<< Click to Display Table of Contents >>

Navigation:  Actions > Window >

Wait for Window

This action is used to synchronize the task with opening or closing a certain window. The action pauses the task and waits for the necessary window operation for the specified timeout and after that resumes the task. If the action does not detect the necessary window operation within the timeout, the "Timeout is over" error occurs.

 

WindowWait1

 

General tab

Window Caption – Window caption. You can specify only the distinctive part of the caption if the window has no constant caption. You can select the window you need from the list if you click the button to the right from the input field.

 

Caption must match exactly – If you need the window caption to match the specified string exactly, select this checkbox.

 

Window class – Window class (or window type). You should either type the window class manually or select the window you need from the list by clicking the button to the left from the input field. You can type part of the window class as well.

 

Class name must match exactly – If you need the window class to match the specified string exactly, select this checkbox. The class of a window does not change all the time the window exists. So, as a rule, you have to enable this option.

 

Select the Window on the Screen

Select existing window interactively. This function highlights the window pointed by mouse. Press CTRL key to select current window or ESC to cancel operation

 

WindowWait2

 

Advanced tab

Watch hidden windows – select this checkbox if you want the action to monitor hidden windows.

Watch child windows – select this checkbox if you want the action to monitor child windows. As a rule, these windows are dialog boxes and secondary windows opened by Windows applications.

Assign window handle to variable – if you want to save the HANDLE (or the system number) of a window to a variable, type the name of this variable in the field. Otherwise leave the field empty. The HANDLE of a window is a unique window identifier. And you can use it later in the Window command action or in Basic script while using it in the script of system API functions.

 

Common settings

Watch for – select the window operation to wait for. There are 4 options to choose from:

Window activated;

Window created;

Window destroyed;

Window deactivated;

Window changed caption.

Waiting – specify the timeout in seconds or select the Infinity option.

If the timeout is over you can specify an action:

Raise Timeout error - this is default option

Set True or False to variable - in this case the task will continue work without error.

 

note Related Topics

Window Command

Check for Window

Window Size and Position

Window Elements Loop

Window Get Size and Position