Key Event

See Also

Setting a Key Event, About Conditions, All Available Conditions, Using AMTrigger, Using AMCondition

Description

Starts the task when a hotkey combination is pressed or a word is typed on the keyboard.

Practical Usage

Useful for creating hotkey "shortcuts" for repetitive multi-step processes.

Parameters

General Tab

 

Trigger on the following hot key

If selected, specifies the hot key combination to be monitored. Selecting this parameter enables the following secondary parameter.

 

Allow hot key to pass through to application

If enabled, specifies that the hot-key combination will continue to be active in an open application. If disabled, the hot key combination will have no effect on any application other than AutoMate (disabled by default)

 

Trigger on the following auto keys

If selected, specifies that the trigger will monitor for the specified word or phrase to be typed. Selecting this parameter enables the following secondary parameter.

 

Erase text before triggering task

If enabled, the monitored text will erase itself from any document or application before triggering the task. However, if you want the typed text to appear in the open application or document, disable this parameter.

 

Only when the following process is active

If selected, the trigger will activate only when the selected process is active on the system during the time that a user enters the specified hot key, word or phrase (disabled by default). Selecting this parameter enables the following secondary parameter.

 

And the application is in the foreground

If selected, the trigger will activate only when the selected process is active and the application window corresponding to that process is currently in the foreground during the time that a user enters the specified hot key, word or phrase.

 

Behavior Tab

All available Conditions contain Behavior properties that dictate how it should handle a monitored event or condition. These properties determine whether the Condition should act as a trigger, a wait object or conditional (or decision making) object. By default, new Conditions are set to wait for the specified event/condition indefinitely, allowing it to act as a trigger object. For more details, see Condition Behavior.

AMTrigger Parameters

When this event triggers a task, 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.

 

Common AMTrigger Fields

 

Every instance of AMTrigger populates a list of common fields which are described in the table below.

 

Name

Data Type

Return Value

AMTrigger.Trigger

String

Returns the name of the event or condition that triggered the task. Each event or condition contains a unique name. For this trigger, the value is always AMKEYTRIGGER.

AMTrigger.TaskName

String

Returns the name of the managed task that the trigger was attached to. Useful to determine the responsible task when two managed tasks point to the same AML file.

AMTrigger.TriggerredDateTime

String

Returns the date and time when the trigger occurred.

AMTrigger.TriggeredOn

String

Returns the machine name where the trigger occurred.

AMTrigger.WasLocked

Boolean

If the workstation was locked when the trigger occurred, the value returned is 1. Otherwise, it will be 0.

AMTrigger.WasLoggedOff

Boolean

If the workstation was logged off when the trigger occurred, the value returned is 1. Otherwise, it will be 0.

AMTrigger.AML

String

Returns a verbose set of information about the triggered event or condition in AML (AutoMate Markup Language) format.

 

Specific AMTrigger Fields

 

The AMTrigger fields listed in the table below are specific only to the Key and Window triggers.

 

Name

Data Type

Return Value

AMTrigger.Keys

Text

Returns the hotkeys or auto keys that activated the event.

AMTrigger.WindowTitle

Text

Specifies the title of the Window in the foreground when the Key trigger was activated.

AMTrigger.WindowHandle

Number

Specifies the handle of the Window in the foreground when the Key trigger was activated. 

 

AMCondition Parameters

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.

Common AMCondition Fields

Each condition contains its own set of unique AMCondition values. Therefore, the total number of fields that AMConditon creates during runtime and what they are called depend largely on the condition that was activated. However, every instance of AMCondition is populated with the following general fields:

Name

Data Type

Return Value

AMCondition.Agent

String

Returns the name of the agent where the condition activated.

AMCondition.DateTime

String

Returns the date and time of when the condition occurred.

AMCondition.Name
 

String

Returns the name of the activated condition. Each condition contains a unique name. For example, if the File condition was initiated, the value returned would be . See the help topic for each condition to determine that object's unique name.

AMCondition.Result
 

String

Returns the result of the activated condition (True or False).

AMCondition.WasLocked

Boolean

If the workstation was locked when the condition occurred, the value returned is 1. Otherwise, it will be 0.

AMCondition.WasLoggedOff

Boolean

If the workstation was logged off when the condition occurred, the value returned is 1. Otherwise, it will be 0.

AMCondition.AML

String

Returns verbose data about the activated condition in AutoMate Markup Language (AML) format.

 

NOTE: A full list of AMTrigger and AMCondition 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

All Available Events & Conditions