Mouse Click CV#

Click an application element — a button, checkbox, input field, list item, menu item, and so on. The click can be performed even if the element is not visible on the screen (window or list scrolling is required).

This block can also be used to select a list item by its text or ordinal number.

Selector[Selector] Identifier of the UI element.

If the selector is empty, the click will be performed using the specified offsets from the current mouse position.
Action

Selection of action:

  • left click,
  • double click,
  • right click,
  • hover.
Modifier Key

[Text] Specify the modifier key that will be held down during the click.

Possible values:

  • "CTRL",
  • "SHIFT",
  • "ALT",
  • "SPACE".

You can specify a key combination, for example: "CTRL+SHIFT".

Process ID

[Link] Variable, in which the process identifier is stored. Indicates, which application should be worked with.

If the specified application is minimized or its window is covered by other windows, it will be brought to the foreground. When working with browsers, the process ID additionally specifies the specific browser tab that the block should work with.

If the property is left empty, or if the Process ID variable was not previously assigned when the application was launched or the browser was opened, the application and browser tab will be determined from the content of the corresponding selector line.

The process ID can be obtained, for example, using the "Run Application" or "Get Process" blocks.

Delay Before[Number] Delay in seconds before executing the block.
Delay After[Number] Delay in seconds after executing the block.
Timeout[Number] Maximum wait time for the specified element in seconds.
Auto ScrollingIf selected, the list will automatically scroll to the element that is outside the visible area.
X Offset

[Number] Relative click offset on the X axis from the upper-left corner of the element.

If no value is specified (the property is empty), the element center will be used as the click point.

Y Offset

[Number] Relative click offset on the Y axis from the upper-left corner of the element.

If no value is specified (the property is empty), the element center will be used as the click point.

Waiting Selector

[Selector] Identifier of the UI element.

If the selector is empty, the block will not wait for this element to appear.

Waiting Selector Wait Type

Choose the wait type:

  • Appear - appearance,
  • Disappear - disappearance.
Delay Before Checking Waiting Selector[Number] Delay Before Checking Waiting Selector.
Waiting Time for Waiting Selector[Number] Maximum wait time for the element specified in the waiting selector, in seconds.
Number of Attempts for Waiting Selector

[Number] Number of Attempts for Waiting Selector.

If the waiting selector is not found, the block will click the main selector.

Movement SimulationWhen enabled, mouse cursor movement from the current position to the point calculated by the block will be simulated.
Click SimulationWhen enabled, a WM message will be sent to the element to emulate a click.
Use Invoke MethodWhen enabled, the Invoke method will be used to click the element.
Absolute Coordinates

If enabled, the "X Offset" and "Y Offset" properties will be used as absolute click coordinates.

If no selector is specified, the click will be performed at these coordinates.

Error Handling Level

Selection of the error handling level.

Possible values:

  • "Default" - default;
  • "Ignore" - errors are ignored;
  • "Handle" - errors are handled.

If "Default" is selected, the value from the "Start" block of this diagram will be used.

New Process ID

[Link] If the process should change as a result of the block, its identifier will be written to the variable specified here.

In most cases, this property and the Process ID property can use the same variable.

Message Level

Selection of the message level that blocks will output during operation.

Possible values:

  • "Default" - default;
  • "Release" - output disabled;
  • "Debug" - main information output;
  • "Detailed" - detailed information output.

If "Default" is selected, the value from the "Start" block of this diagram will be used.

Error Text[Text] Returns detailed information about the error in case of incorrect execution of the block.