Input - Hold key
Declaration
<AMINPUT ACTIVITY="hold_key" SHIFT="YES/NO" ALT="YES/NO" CTRL="YES/NO" WINKEY="YES/NO" ALTGR="YES/NO" />
Description
Holds the specified keys down until a Input - Release key step is encountered.
Practical usage
Generally used in conjunction with the Input - Release key action to hold down special keys spanning multiple steps. For example if the application being automated requires that the ALT key be held down while mouse clicks are taking place, that task could begin with this step to hold down the ALT key, followed by the Input - Move mouse or Interactivity - Move mouse to object and Input - Click mouse steps, finally ending with a Input - Release key step.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Shift | Yes/No | No | No | SHIFT="YES" | Indicates that the SHIFT key should be held down for this and all steps following in the task until a Input - Release key step is encountered. |
Ctrl | Yes/No | No | No | CTRL="YES" | Indicates that the CTRL key should be held down for this and all steps following in the task until a Input - Release key step is encountered. |
Alt Gr | Yes/No | No | No | ALTGR="YES" | Indicates that the ALTGR key (available on many international keyboard layouts) should be held down for this and all steps following in the task until a Input - Release key step is encountered. |
Alt | Yes/No | No | No | ALT="YES" | Indicates that the ALT key should be held down for this and all steps following in the task until a Input - Release key step is encountered. |
Windows Key | Yes/No | No | No | WINKEY="YES" | Indicates that the Winkey (Windows start key with the Microsoft Windows logo on it) should be held down for this and all steps following in the task until a Input - Release key step is encountered. |
Example
- 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.
Description
This sample task displays usage of a Hold Down Key and Release Key actions.
<AMINPUT ACTIVITY="hold_key" SHIFT="YES" />
<AMINTERACT ACTIVITY="mouse_to_object" WINDOWTITLE="Home - BBC News - Internet Explorer" OBJECTPROPERTIES="Toolkit=UIAutomation,Type=50020,Class=,FrameworkId=,Name=UK,AutomationId=,Value=https://www.bbc.co.uk/news/uk,ParentPath=50032|50033|50033|50033|50033|50004|50004|50008|50007|50005|50020,Occurrence=,X=,Y=" />
<AMINPUT ACTIVITY="click_mouse" CLICK="double" />
<AMINPUT ACTIVITY="release_key" SHIFT="YES" />