Keyboard 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 Type Description
Hotkey (Press the hotkey you wish to use) Text If enabled, specifies the hot key combination to be monitored. The default value is Alt+A. This parameter is enabled by default.
Allow hotkey to continue to application Yes/No If selected, specifies that the hotkey 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 Desktop (disabled by default). This parameter is available only if the Hotkey parameter is enabled.
Text Text If enabled, the trigger will monitor for the specified text or phrase to be typed (disabled by default). If this parameter is enabled, the Hotkey parameter above is ignored.
Erase text afterwards Yes/No If selected, the monitored text will erase itself  from any document or application before triggering the task. If you want the typed text to appear in the open application or  document, set this parameter to NO (disabled by default). This parameter  is available only if the Text parameter described above is enabled.
Only when the following process is active Text 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.
Window process must be focused Yes/No If selected, the trigger will activate only if the active window process is in focus or in the foreground. If disabled, the trigger will activate regardless of whether the window process is focused or in the background. This parameter is available only if the Only when the following process is active parameter described above is enabled.

Behavior

Property Type Description
Enable Trigger Yes/No If selected, the trigger will immediately be active upon creation. If disabled, the trigger will stay inactive until it is manually enabled (by right-clicking the trigger and selecting Enable). This parameter is selected by default.
Trigger after the condition has been met 'X' times. Yes/No 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 Desktop dataset and can be used much like the datasets created by the Database - SQL query activity and Email action. 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 Desktop 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 Type Value
AMTrigger.Keys Text Returns the hot-key combination or auto-keys that activated the trigger.
AMTrigger.WindowClass Text 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 Text 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.