Skip to main content

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​

InputTypeRequiredDefaultWhat it is
ModeStringNochangechange: wait until the region differs from how it looked at the start; settle: wait until it stays the same for stable_ms.
Threshold percentNumberNo1Share of the region's pixels that must differ to count as a change (ignores a blinking cursor).
Unchanged for (milliseconds)NumberNo1000settle: how long the region must stay unchanged.
Timeout (seconds)NumberNo30Maximum wait.
Interval (milliseconds)NumberNo250Pause between two looks at the screen.
Fail on timeoutBooleanNotrueFail with IMAGE.NO_CHANGE (or IMAGE.NOT_STEADY) when time runs out; otherwise changed is false.
XNumberNoRegion left; the whole screen when the region is empty.
YNumberNoRegion top.
WidthNumberNoRegion width.
HeightNumberNoRegion height.
WindowStringNoTitle 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)NumberNo0Wait this long before the first look, e.g. while a click starts the change.

Outputs​

OutputTypeWhat it is
changedBooleanTrue when the awaited change (or the steady state) happened in time.
changed_percentNumberHow much of the region differed from the first look, in percent.