Wait for window
Wait until a window whose title matches (or the main window of a process) opens, or until it has closed.
Command in the Window toolkit · id ooa.window/wait_for · 6 inputs, 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Title | String | No | Text in the window title, a pattern with * or ? (e.g. Invoice*- Excel), or re: and a regular expression; case-insensitive. The first visible window that matches is used. May be empty when process_id is given. | |
| Timeout (seconds) | Number | No | 30 | Maximum wait. |
| Alternatives | Dictionary | No | Fallbacks when no title matches: title_pattern (wildcards or re:), class_name, process_name, and index (with class_name). The one that works is logged. | |
| State | String | No | open | open: wait until the window is there; close: wait until no window with this title is left. |
| Fail on timeout | Boolean | No | true | Fail the step when time runs out; when off, met is false and the agent carries on. |
| Process ID | Number | No | Process id from Start program: use that program's main window instead of finding it by title; title, when given, then only narrows the choice. |
Outputs
| Output | Type | What it is |
|---|---|---|
| title | String | Full title of the window that opened (or that was open when waiting for it to close). |
| met | Boolean | True when the window opened or closed in time. |