Window Trigger

Window Condition

Description

Starts a task/workflow when the specified window opens, closes, is focused or loses focus. It can also be used in the middle of a workflow to wait for a window to open, close, focus or lose focus before continuing or determine the path of a workflow depending on whether a window is open, close, focused or not focused.

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.

Parameters

General Properties

 

Property

Description

Action

Specifies the action to monitor. The available options are:

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

Wait for window to close - The trigger will monitor for the specified window to close.

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

Wait for window to not be focused - The trigger will monitor for the specified window to lose focus.

Triggers once when the window is first open

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

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

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

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

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 Properties

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 Properties

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 Properties

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 about condition behavior

AMTrigger

When this trigger is activated, it automatically passes the "AMTrigger" object to the task. AMTrigger can be used within a task to determine whether or not the task was started by a trigger, which trigger started the task, when the trigger was activated and other trigger related properties. F

Exclusive AMTrigger Fields

The AMTrigger fields described in the table below are specific only to the Window Condition.

Name

Type

Return Value

AMTrigger.WindowClass

String

Specifies the title of the window in the foreground when the trigger was activated.

AMTrigger.WindowHandle

Number

Specifies the handle of the window in the foreground when the trigger was activated. 

AMCondition

When this condition is used in the middle of a workflow (as opposed to triggering condition) it automatically passes the AMCondition object to the task.

Exclusive AMCondition Fields

The AMCondition fields described in the table below are specific only to the Window Condition.

Name

Type

Return Value

AMCondition.WindowClass

String

Specifies the title of the window in the foreground when the trigger was activated.

AMCondition.WindowHandle

Number

Specifies the handle of the window in the foreground when the trigger was activated. 

 

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

See Also


About Events & Conditions | Condition Behavior | Event Log Condition | File Condition | Idle Condition | Key Event | Logon Condition | Performance Condition | Process Condition | SNMP Trap Condition | Window Condition | WMI Condition