wait_for
Pause automation until a GUI window, stable screen, screen-reader announcement, focus change, visual match, or log line appears, instead of fixed sleeps.
Instructions
Wait, instead of sleeping, for: a window (value: its title, exactly or a regex, or app=RE), stable (the screen, or the window, unchanged for value seconds, 0.5, up to 60: after a click, for the repaint), an announcement (value: a regex in what was announced to a screen reader; each announcement is waited for once), focus (value: the name of the node with the keyboard focus, as click takes one), match (value: a PNG, by its path from the allow file's directory, that the screen, or the window, cropped to crop, should look like), change (from how it looked when the wait started), or line (value: a regex found in a line of file, written after the wait starts, or with from_start, anywhere in it: for a program that logs its events, rather than a sleep; a file not there yet is waited for, and one rotated or rewritten is read from the top). match and change say how long they took; line answers with the line. Fails after timeout seconds, saying so.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crop | No | WIDTHxHEIGHT+X+Y, inside what's taken | |
| file | No | line's, by its path from the allow file's directory | |
| fuzz | No | match, change: percent a pixel may differ by (0) | |
| most | No | match, change: pixels past fuzz allowed (0) | |
| what | Yes | The kind of wait | |
| value | No | What to wait for, as what says | |
| 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 | Seconds before it fails (10) | |
| from_start | No | line: anywhere in file |