Activities
latest
false
Banner background image
UI Automation Activities
Last updated Mar 18, 2024

Block User Input

UiPath.System.Activities.BlockUserInput

A container which disables the mouse and keyboard when activities inside it run. Can be configured to block either mouse, keyboard, or both, and permits you to designate a hotkey combination to re-enable them.

Note: Certain user input devices such as touchpads, trackpads or touchscreens may not be completely blocked by this activity. Due to the wide variety of device models and drivers as well as the complex commands their gestures can produce, some multi-finger gestures or touchscreen specific interactions are sent to the operating system as software events. Since in UI Automation scenarios, Robots use software events to simulate human interaction, they cannot be blocked.
Note: Using Block User Input with Parallel activities (such as Parallel For Each) is not supported.
Note: When running an automation process that uses the Block User Input activity as a job from Orchestrator, and the Executor does not have administrator privileges on the machine you run the process on, any application that has a higher privilege than the Executor and is in focus cannot be blocked by the activity. As a workaround, offering administrator privileges to the Executor enables the Block User Input activity to work as expected.
Note: Using Debug inside a Block User Input scope enables the effects of the scope. To disable the block, you can use the hotkey combination specified in the Unblock Options section of the properties. Once turned off, the state of all elements can be inspected as usual in a Debug context. Please note that execution can only be continued without the effect of the scope and workflow functionality might be broken.

Properties

Common
  • ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.

    Note: If this activity is included in Try Catch and the value of the ContinueOnError property is True, no error is caught when the project is executed.
  • DisplayName - The display name of the activity.
Input
  • Block - A drop-down list which specifies whether you want to disable only mouse, only keyboard, or both.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Unblock options
Note: Once the designated hotkey combination for reactivating user input is pressed, and user input is restored, it cannot be blocked again during the same runtime. The hotkey combination is implemented as a safeguard against blocking yourself from stopping the workflow while developing it.
  • Key - The key you want to use to reactivate the mouse and keyboard.
  • KeyModifiers - The modifiers you want to use alongside the key selected in the Key property to reactivate the mouse and keyboard. The following options are available: Alt, Ctrl, Shift, and Win.
  • SpecialKey - Indicates if you are using a special key in the keyboard shortcut. A list of all available special keys is provided in the Key drop-down list present in the body of the activity.

    Note: If other keys are pressed simultaneously with the designated key combination, the user input is restored anyway. This is designed as a safeguard against cases when the automation process hangs while continuously sending keys.
  • Timeout (milliseconds) - The amount of time the activity waits before throwing an error, expressed in milliseconds. This field supports only integers and Int32 variables.
  • Properties

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.