Key Trigger

Description

Triggers task execution when a hot-key combination is pressed or a specific word is typed on the keyboard. Additionally, the event can be configured to occur only when a specific application is active and/or has focus.

Practical Usage

Useful for creating hot-key "shortcuts" for repetitive multi-step processes. Also can be used as another way for a user to manually run a task.

Related Topics  

Parameters

General

Property

Description

Trigger on the following hot key

If enabled, specifies the hot key combination to be monitored. The default value is Alt+A. This parameter is enabled by default.

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). This parameter is available only if the Trigger on the following hot key parameter is enabled.

Trigger on the following auto-keys

If enabled, the trigger will monitor for the specified word or phrase to be typed (disabled by default). If this parameter is enabled, the Trigger on the following hot key parameter is ignored.

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 (disabled by default). This parameter is available only if the Trigger on the following auto-keys parameter is enabled.

Only when the following process is active

If enabled, 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). Full path to the process is required. The drop-down arrow will show a list of running processes to select from, or you can use the Folder icon to navigate to the desired process.

And the application is in the foreground

If enabled, 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. This parameter is available only if the Only when the following process is active parameter is enabled.

Behavior

Property

Description

Trigger on startup if condition is true

If enabled, the system will act upon conditions that already exist upon startup of the current trigger. For example, if the Notepad window is already open on the desktop, a newly created Window trigger set to monitor for the existence of a Notepad window will immediately launch the task as a result. If disabled, the trigger will ignore the open Notepad window upon startup. This parameter is disabled by default.

Trigger after the condition has been met 'X' times.

If enabled, specifies how many times the trigger condition must be met before the task is started. For example, if a Window trigger is set to monitor for the appearance of a Notepad window and this parameter is set to 3, the task will not launch until the third instance of Notepad appears on the desktop.

 

additional notes

AMTrigger

When this trigger is activated, it automatically passes the AMTrigger object to the task. AMTrigger is a standard AutoMate dataset and can be used much like the datasets created by the SQL Query and Email actions. The fields of AMTrigger can be used within a task to determine specific values, such as whether or not the task was started by a trigger, which trigger started the task, when the trigger was activated and other properties. AMTrigger populates a unique set of field–value pairs for each AutoMate trigger. The following table lists the ones specific to this trigger. For more details about a specific AMTrigger field–value pair, click the associated link.

Name

Data Type

Value

AMTrigger.Keys

String

Returns the hot-key combination or auto-keys that activated the trigger.

AMTrigger.WindowClass

String

Returns the window class of the window that was focused (in front of all other open windows) when the trigger occurred.

AMTrigger.WindowHandle

Number

Returns the window handle of the window that was focused (in front of all other open windows) when the trigger occurred.

AMTrigger.WindowTitle

String

Returns the title of the window that was focused (in front of all other open windows) when the trigger occurred.


NOTE: A full list of AMTrigger objects exclusive to each trigger can be viewed from the Expression Builder by expanding Objects -> Triggers and selecting the desired trigger.