wait_for
Wait for a GUI or file condition instead of sleeping: a window, stable screen, announcement, focus, image match, change, or log line; fail after timeout.
Instructions
Wait, instead of sleeping, for: a window (value: its title, exactly or a regex, or app=RE, or the name of a program spawn_program started, for a window of that program's, whatever its title; giving up, it lists the windows there are), 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_element 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 |