click
Activate a named GUI node or an x/y point in a window, waiting for it to appear and focusing its window first. Also supports button holds, double presses, and state control.
Instructions
Click a node by its name, or a point by x and y, on the screen or inside a window. By name is the one to use: it waits up to timeout seconds for the node, raises its window and clicks its middle. When two nodes match it lists them, with where they are; when none does, the nearest names. A click gives a window the keyboard, which nothing else does on X11. hold and state, by x and y, hold the button as press_keys holds keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Pixels from the left | |
| y | No | Pixels from the top | |
| hold | No | Seconds to keep it down before letting go | |
| name | No | A node's name, as accessible_tree gives it: exactly, or a regex matched in full | |
| role | No | Narrows name: exactly, or a regex | |
| state | No | Only press, leaving it down until a call with up; or only let go | |
| button | No | 1 left, 2 middle, 3 right | |
| double | No | Click twice, as a double click | |
| window | No | A window's title, exactly or a regex matched in full, or app=RE for its app id | |
| session | Yes | Its name, from start_session | |
| timeout | No | By name, seconds to wait for the node (10) |