Input - Block input

Declaration

<AMINPUT ACTIVITY="block_input" ACTION="unlock" />

Related Topics

Description

Blocks user input from the keyboard and mouse. Also used to unblock input that was previously blocked.

Practical usage

Useful for preventing user interference during task execution. This activity is typically set to block input in the beginning of an interactive task (for example, Input - Send keystrokes, Input - Move mouse, Input - Click mouse actions) and again used at the end of the task to Unblock input.

NOTE: Input is automatically unblocked/restored upon task completion, however, if input needs to be unblocked before completion, simply add a Unblock input step. A blocked input can be manually unblocked at any time by entering CTRL+ALT+DEL.

Parameters

General

Property Type Required Default Markup Description
Action Text (options) Yes Block input

ACTION="unblock"

Specifies whether keyboard and mouse input should be blocked or unblocked. The available options are:
  • Block input - Keyboard and mouse input will be blocked for the duration of the task or until an Unblock input step is encountered.
  • Unblock input - Keyboard and mouse input will be unblocked.

Description

Error Causes

On Error

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.

Description

This task blocks input in order to prevent user interference while sending keystrokes to Notepad, and unblocks input thereafter.

Copy
<AMINPUT ACTIVITY="block_input" />
<AMRUN FILE="Notepad" />
<AMINPUT KEYSTROKES="The keyboard and mouse is now blocked. The next step will unblock the input. To manually unblock input, press CTRL-ALT-DEL" />
<AMINPUT ACTIVITY="block_input" ACTION="unlock" />