Skip to main content

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​

InputTypeRequiredDefaultWhat it is
TitleStringNoText 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)NumberNo30Maximum wait.
AlternativesDictionaryNoFallbacks when no title matches: title_pattern (wildcards or re:), class_name, process_name, and index (with class_name). The one that works is logged.
StateStringNoopenopen: wait until the window is there; close: wait until no window with this title is left.
Fail on timeoutBooleanNotrueFail the step when time runs out; when off, met is false and the agent carries on.
Process IDNumberNoProcess 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​

OutputTypeWhat it is
titleStringFull title of the window that opened (or that was open when waiting for it to close).
metBooleanTrue when the window opened or closed in time.