click_ui
Clicks a UI control by accessible name or mark using the accessibility tree, eliminating screenshots and pixel estimation. Works on focused or background windows.
Instructions
Click a control by its accessible NAME, or by a mark number from
the last marks capture, in ONE call: the control comes from the
accessibility tree, so no screenshot and no pixel estimation is spent.
On the window the human is in, the window is focused and the click
goes through the real pointer (visible cursor, same panic-kill
guarantees). On any other window it runs in the background: the
control's accessibility action presses it (a text field gets the app's
own focus), the human's cursor and focus stay put, and the result reads
the control back; a control with no action is refused there. When no
control matches, a name also finds an element in another role that has
an action (a web app's list row); if its action only focuses it, the
result says so and whether the app reports it focused, which does not
show what a key sent next will do: check with ui.
background true or false forces one way (false takes over the human's
screen). Pass exactly one of
name (matched against window's controls, exact accessible name
preferred, substring otherwise) or mark. An ambiguous name returns
the candidates instead of guessing: disambiguate with index (0-based
into that list) or a more specific name. Falls back with a note when
the app exposes no tree (use screenshot + zoom + pointer then).
then ('desktop'|'screenshot'|'ui'|'none') appends the result;
'ui' shows the click's effect on the controls in the same call.
allow_auth=true overrides the refusal to click a system
authentication dialog.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mark | No | ||
| name | No | ||
| then | No | none | |
| index | No | ||
| button | No | left | |
| double | No | ||
| window | No | ||
| allow_auth | No | ||
| background | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |