Window Condition

Description

Monitors for a window to reach a specific condition or state (i.e. window open, closed, focused) and evaluates as TRUE when the condition is met. This condition can be set as one of the following workflow elements:

Practical Usage

Useful in a "back office" (or unattended) environment for monitoring the system for application generated error dialogs. These dialog boxes could be automatically handled when they occur and/or a notification message could be sent to the system administrator.

Related Topics  

Parameters

General

Property

Type

Description

Trigger if/when

Options

Specifies the window state to monitor. The available options are:

  • Window open (default) - The trigger will monitor for the specified window to open.

  • Window closed- The trigger will monitor for the specified window to close.

  • Window focused - The trigger will monitor for the specified window to become focused (or appears in the foreground).

  • Window not focused - The trigger will monitor for the specified window to lose focus.

Triggers once when the window is first open

Yes/No

If enabled, specifies that the action to be performed on the window being monitored will occur only once when that window first opens and ignore other instances. For example, if this trigger is set to wait for Notepad to close, enabling this option tells the trigger to watch for the first instance of Notepad to open and activate only when that first instance closes. If a second instance of Notepad opens and closes before the first instance, that action is ignored.

Window title must be

String

If enabled, specifies the title of the window to monitor. The value is not case sensitive. This parameter supports wildcard characters (* and ?). For example, entering *Internet Explorer* would include all windows containing Internet Explorer (enabled by default).

Window class must be

String

If enabled, specifies the class of the window to monitor. A window class is a set of attributes that the system uses as a template to create a window. Every window is a member of a window class. All window classes are process specific. The value is not case sensitive. This parameter supports wildcard characters (* and ?). For example, entering *Explore* would include all window classes containing Explore (disabled by default).

Window handle must be

String

If enabled, specifies the handle of the window to monitor. A window handle is code that uniquely identifies an open window (disabled by default).

Window is a child window

Yes/No

If enabled, specifies that the window to monitor is a child window. A child window is normally a secondary window on screen that is displayed within the main overall window of the application. This option is available only when the Action parameter is set to Wait for window to be focused or Wait for window to not be focused.

Drag -->

---

Drag this icon to an open window to have AutoMate automatically detect that window's properties.

Contents

The Contents tab contains standard window dissection parameters (i.e. object name, type, class, value and position) used to describe controls or text in a window. These options are useful in determining windows with identical titles as documented under Window Dissection parameters.

Property

Description

Window must contain the objects

If enabled, allows you to define other window characteristics used to determine a matching window (disabled by default). To select an object from an existing window, click Add and either use the Browse button or drag the hand icon to the area on the screen. Then use the Edit button to edit specific properties.

Advanced

Property

Description

Delay to wait for before analyzing a window

Use a delay to prevent this condition from checking a window's condition immediately. For example, an Internet Explorer window may appear before its page contents are completely downloaded. The default value is 1,000 milliseconds.

Behavior

The Behavior tab properties dictate how the system should react upon the occurrence of a condition. These properties are significant in determining whether the AutoMate Condition should act as a trigger object (used to fire off workflow execution), wait object (used to suspend workflow execution) or conditional (decision making) object.

More on Condition Behavior

Additional Notes

AMTrigger

When the Window condition is used to trigger workflow execution, it automatically creates an AMTrigger dataset which can be used much like the datasets created by the SQL Query and E-Mail actions. The fields that AMTrigger generates can be used to determine properties of the object that caused the workflow to launch, such as the type of trigger, when the trigger was activated and what system event or condition took place to activate the trigger. Along with a collection of global AMTrigger fields that are created and populated by every instance of AMTrigger, a unique set of AMTrigger fields exclusive to each AutoMate trigger are created as well.

To view AMTrigger values exclusive to the Window condition, see AMTrigger - Window.

AMCondition

When the Window condition is used in the middle of a workflow as wait or conditional object, it automatically creates an AMCondition dataset. Similar to AMTrigger, the fields that AMCondition generates can be used to determine properties of the object that caused the condition to activate. Along with a collection of global AMCondition fields that are created and populated by every instance of AMCondition, a unique set of AMCondition fields exclusive to each AutoMate condition are created as well.

To view AMCondition values exclusive to the Window condition, see AMCondition - Window.

NOTE: A full list of AMTrigger and AMCondition fields exclusive to each trigger/condition can be viewed from Expression Builder by expanding the Objects folder and selecting the desired object from either the Triggers or Conditions folder.