|
Window Condition |
Description
Monitors for a window to reach a specific condition or state (that is, 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:
-
Trigger element - When positioned in the beginning of a workflow, triggers its execution when the monitored condition (that is, Internet Explorer browser window opens) evaluates to TRUE.
-
Wait element - Suspends execution of a running workflow until the monitored condition (that is, Internet Explorer window becomes focused) valuates to TRUE.
-
Conditional element - Determines the course of a workflow depending on whether or not a specific condition (that is, Internet Explorer window closes) evaluates to TRUE.
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
This condition comprises Automate's Window Dissection technology to facilitate the discovery of existing windows and their controls. To select the target window:
- Make certain the window is open and in the foreground (in front of all other open windows).
- Drag and release the magnifier icon over the window. If the window is supported by this condition, a green border will appear around it.
- Upon releasing the icon, identified window properties are populated onto the editor. These properties can be enabled / disabled or further modified.
Property | Type | Description |
---|---|---|
Trigger if/when | Options | Specifies the window state to
monitor. The available options are:
|
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. |
By window title | Text | If enabled, specifies the title of the window to monitor. The value is not case sensitive. This parameter supports wildcard characters (that is, * and ?). For example, entering *Internet Explorer* would include all windows containing Internet Explorer (enabled by default). |
By window class | Text | 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 (that is, * and ?). For example, entering *Explore* would include all window classes containing Explore (disabled by default). |
By window handle | Text | 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. A child window is normally a secondary window on screen that is displayed within the main overall window of the application. A child window is a window has the following properties:
NOTE: 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.
|
Contents
If multiple windows with the same title exists, it may be necessary to use Automate's Object Editor to specify additional criteria, such as unique objects, controls or properties, in order to distinguish one window from another. To identify additional elements, enable Window must contain the following objects, and then click Add to open the Object Editor dialog. Thereafter, do one of the following:
- Drag and release the magnifier icon over the desired object or control. The Object properties grid becomes populated with a list of name / value pairs unique to that object. Individual values can be enabled / disabled according to preference.
- Click Browse to traverse the list of available objects / controls for the selected window. Select the desired object from the Window contents column, and then click OK. The Object properties grid becomes populated with a list of defined properties unique to that object. Individual values can be enabled or disabled according to preference.
Available object properties are described below:
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Toolkit | Text | No | (Empty) |
|
If enabled, specifies that the toolkit (a set of basic building units for graphical user interfaces) will be examined when determining a matching object. If disabled, the toolkit will be ignored. The toolkit that appears is based on the Accessibility engine used:
|
Type | Text | No | (Empty) | TYPE=PushButton | If enabled, specifies that the object's type (that is, Button, Checkbox, Trackbar) will be examined when determining a matching object. If disabled, the type will be ignored. |
Class | Text | No | (Empty) | CLASS=SysTreeView32 | If enabled, specifies that the object's class (that is, XTPToolBar, SysTreeView, MDIClient) will be examined when determining a matching object. If disabled, the class will be ignored. |
FrameworkId | Text | No | (Empty) | FRAMEWORKID=WPF | If enabled, specifies that the object's framework ID (the framework technology used to create the object) will be examined when determining a matching object. If disabled, the framework ID will be ignored. |
Name | Text | No | (Empty) | NAME=Cancel | If enabled, specifies that the object's name (a unique identifier for an object) will be examined when determining a matching object. If disabled, the name will be ignored. |
AutomationId | Text | No | (Empty) | AUTOMATIONID=System | If enabled, specifies that the object's automation ID (a unique identifier for an object) will be examined when determining a matching object. If disabled, the automation ID will be ignored. |
Value | Text | No | (Empty) | VALUE=1 | If enabled, specifies that the object's value (which usually coincides with the Name property) will be examined when determining a matching object. If disabled, the value will be ignored. |
Role | Text | No | (Empty) | ROLE=desktop pane | If enabled, specifies that the object's role type (the control type provided by the Java Accessibility bridge) will be examined when determining a matching object. If disabled, the role type will be ignored. |
Description | Text | No | (Empty) | DESCRIPTION=JScrollPane | If enabled, specifies that the object's description (the description given for an object) will be examined when determining a matching object. If disabled, the description will be ignored. |
X | Number | No | (Empty) | X=80 | If
enabled, specifies that the object's X coordinate (a given
number of pixels along the horizontal axis of a window starting
from the extreme left side) will be examined when determining
a matching object. If disabled, the X coordinate will be
ignored. NOTE: The X and Y coordinates are relative to the specified window as
opposed to the screen. |
Y | Number | No | (Empty) | Y=90 | If
enabled, specifies that the object's Y coordinate (a given
number of pixels along the vertical axis of a window starting
from the top-most portion) will be examined when determining a
matching object. If disabled, the Y coordinates will be ignored.
NOTE: The X and Y coordinates are relative to the specified window as
opposed to the screen. |
Width | Number | No | (Empty) | WIDTH=711 | If enabled, specifies that the object's pixel width will be examined when determining a matching object. If disabled, the pixel width will be ignored. |
Height | Number | No | (Empty) | HEIGHT=42 | If enabled, specifies that the object's pixel height will be examined when determining a matching object. If disabled, the pixel height will be ignored. |
IndexInParent | Text | No | (Empty) | INDEXINPARENT=1 | If enabled, specifies that the object's index in parent number (the numeric identifier of a child object located within a parent object) will be examined when determining a matching object. If disabled, the index in parent number will be ignored. |
ParentPath | Text | No | (Empty) | PARENTPATH=50032|50033 | If enabled, specifies that the object's parent path (the sequence of control type identifiers that lead to the object) will be examined when determining a matching object. If disabled, the parent path will be ignored. |
Occurrence | Number | No | (Empty) | OCCURRENCE=1 | If enabled, specifies that the object's occurrence (the numeric identifier of an object, useful when multiple matching objects are found) will be examined when determining a matching object. If disabled, the occurrence will be ignored. |
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.
Additional Notes
AMTrigger
When the Key event is used to trigger workflow execution, it automatically creates an AMTrigger dataset which can be used much like the datasets created by the Database - SQL query activity and Email action. 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.