ui_set_text
Enter text into editable fields via AT-SPI even when unfocused or screen-locked, then verify the text landed.
Instructions
PREFERRED way to enter text. Writes through AT-SPI EditableText, which needs no focus and no ydotool: it works on an unfocused window and even while the screen is locked, and it reads the widget back to prove the text landed. Use type_text only when a widget is not AT-SPI-editable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Application name; its editable text widget is located automatically | |
| look | No | What to show you afterwards. Default "auto": wait for the screen to stop changing, measure how much this action changed, and attach a picture of the affected window only if something did change -- so a click that hit nothing costs no tokens and says so. "window" always attaches it, "screen" uses the whole desktop (slower, 6x the tokens), "region" uses look_at, false skips all of it. Use false for the middle of a sequence you are going to check at the end anyway. | auto |
| path | No | Or an exact index path. Both tools return the resolved path -- pass it back to address the SAME document across write and read; without it, both prefer the focused text widget. | |
| text | Yes | Text to write | |
| look_at | No | Rectangle for look:"region", in screen pixels. Object form {x, y, width, height} or array form [x, y, width, height]. | |
| replace | No | Clear existing content first | |
| settle_max_s | No | How long to wait for the screen to stop changing before looking. Raise it for an app that animates slowly; set it to 0 to capture immediately. |