# Mouse Click

A mouse click on an application element - button, checkbox, input field, list item, menu item, etc. A click can be performed even if the element is not visible on the screen (scrolling of the window or list is needed). This block can also be used to select a list item by its text or ordinal number.

<table data-header-hidden><thead><tr><th width="226" valign="top"></th><th width="343" valign="top"></th></tr></thead><tbody><tr><td valign="top">Selector</td><td valign="top">[Selector] Identifier of the user interface element. If the selector is empty, the click will be performed using the specified offsets from the current cursor position.</td></tr><tr><td valign="top">Action</td><td valign="top">Select action: left click, double click, right click, hover.</td></tr><tr><td valign="top">Modifier key</td><td valign="top"><p>[Text] The modifier key that will be held down during the click. Possible values: "CTRL", "SHIFT", "ALT", "SPACE".</p><p>It is possible to specify a key combination, for example: "CTRL+SHIFT".</p></td></tr><tr><td valign="top">Process ID</td><td valign="top"><p>[Link] A variable that stores the process identifier. Indicates which application to work with.</p><p>If the specified application is minimized or its window is covered by other windows, it will be brought to the foreground.</p><p>When working with browsers, the process ID additionally specifies the specific browser tab that the block should work with.</p><p>If the property is left empty, or if the process ID variable was not previously assigned at the moment of launching the application or opening the browser, 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 Launch Application or Get Process blocks.</p></td></tr><tr><td valign="top">Delay before</td><td valign="top">[Number] Delay in seconds before executing the block.</td></tr><tr><td valign="top">Delay after</td><td valign="top">[Number] Delay in seconds after executing the block.</td></tr><tr><td valign="top">Timeout</td><td valign="top">[Number] Maximum wait time for the specified element in seconds.</td></tr><tr><td valign="top">Auto-scrolling</td><td valign="top">If selected, the list will automatically scroll to the element that is outside the visible area.</td></tr><tr><td valign="top">X offset</td><td valign="top">[Number] Relative click offset on the X coordinate from the top-left corner of the element. If no value is specified (property is empty), the center of the element will be used as the click point.</td></tr><tr><td valign="top">Y offset</td><td valign="top">[Number] Relative click offset on the Y coordinate from the top-left corner of the element. If no value is specified (property is empty), the center of the element will be used as the click point.</td></tr><tr><td valign="top">Wait selector</td><td valign="top">[Selector] Identifier of the user interface element. If the selector is empty, the block will not wait for the appearance of this element.</td></tr><tr><td valign="top">Wait selector wait type</td><td valign="top"><p>Select wait type:</p><ul><li>Appear - appearance,</li><li>Disappear - disappearance.</li></ul></td></tr><tr><td valign="top">Delay before checking wait selector</td><td valign="top">[Number] Delay before checking the wait selector.</td></tr><tr><td valign="top">Timeout for wait selector</td><td valign="top">[Number] Maximum wait time for the element specified in the wait selector in seconds.</td></tr><tr><td valign="top">Number of attempts for wait selector</td><td valign="top">[Number] Number of attempts for the wait selector. If the wait selector is not found, the block will perform a click on the main selector.</td></tr><tr><td valign="top">Simulate movement</td><td valign="top">If enabled, the mouse cursor movement will be simulated from the current position to the point calculated by the block.</td></tr><tr><td valign="top">Simulate click</td><td valign="top">If enabled, a WM message will be sent to the element to emulate a click.</td></tr><tr><td valign="top">Use Invoke method</td><td valign="top">If enabled, the Invoke method will be used for clicking on the element.</td></tr><tr><td valign="top">Absolute coordinates</td><td valign="top">If enabled, the properties "X offset" and "Y offset" will be used as absolute coordinates for the click. If no selector is specified, the click will be performed at these coordinates.</td></tr><tr><td valign="top">Error handling level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">New process ID</td><td valign="top">[Link] If the process should change as a result of the block's operation, 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.</td></tr><tr><td valign="top">Message level</td><td valign="top"><p>Select the message level that the blocks will output during operation.</p><p>Possible values:</p><ul><li>"Default" - default;</li><li>"Release" - output disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>
