Wait for screen change
Wait until a region of the screen changes (e.g. a result appears), or until it stops changing (e.g. a page or application has finished drawing).
Command in the Image recognition toolkit · id ooa.image/wait_for_screen_change · 12 inputs, 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Mode | String | No | change | change: wait until the region differs from how it looked at the start; settle: wait until it stays the same for stable_ms. |
| Threshold percent | Number | No | 1 | Share of the region's pixels that must differ to count as a change (ignores a blinking cursor). |
| Unchanged for (milliseconds) | Number | No | 1000 | settle: how long the region must stay unchanged. |
| Timeout (seconds) | Number | No | 30 | Maximum wait. |
| Interval (milliseconds) | Number | No | 250 | Pause between two looks at the screen. |
| Fail on timeout | Boolean | No | true | Fail with IMAGE.NO_CHANGE (or IMAGE.NOT_STEADY) when time runs out; otherwise changed is false. |
| X | Number | No | Region left; the whole screen when the region is empty. | |
| Y | Number | No | Region top. | |
| Width | Number | No | Region width. | |
| Height | Number | No | Region height. | |
| Window | String | No | Title of a window to watch: it is brought to the front and the region is measured from its top-left corner (the whole window when the region is empty). | |
| Initial wait (milliseconds) | Number | No | 0 | Wait this long before the first look, e.g. while a click starts the change. |
Outputs
| Output | Type | What it is |
|---|---|---|
| changed | Boolean | True when the awaited change (or the steady state) happened in time. |
| changed_percent | Number | How much of the region differed from the first look, in percent. |