AMTrigger.WindowHandle

Syntax

%AMTrigger.WindowHandle%

Triggers supported

Key, Window

Type

String

Description

Returns the window handle of the window that activated the trigger. The table below describes how this value is returned for each type of trigger.

Trigger Type Description
Key trigger Returns the unique window class of the window that was focused (in front of all other open windows) when the trigger occurred.
Window trigger Returns the window handle of the window that activated the trigger.

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Display the message "When the task triggered, the focused window's handle was %AMTrigger.WindowHandle%" in a message box.

Copy
<AMSHOWDIALOG>When the task triggered, the focused window's handle was %AMTrigger.WindowHandle%</AMSHOWDIALOG>

Related Topics