Docs
RunMacro Documentation
Create your first robot, then go further as needed.
Clear step-by-step guides to create, run, and improve robots for repetitive computer work.
Branch on whether a window exists in RunMacro
The IF Window Exists command checks whether one (or more) windows with given titles are open, retrying until found.
Prerequisites#
- Add IF Window Exists to the macro.
- Prepare the data or target that IF Window Exists will use.
Supported modes#
- Desktop Mode
What it does#
The IF Window Exists command checks whether one (or more) windows with given titles are open, retrying until found. If found it jumps to the IF label (and can bring it forward); if not, it jumps to ELSE.
Screenshots & video#

When to use it#
- Wait for an app/dialog to open before acting.
- Verify a successful login (main window appears).
- Branch differently depending on which window is open.
When not to use it#
- Do not use an instantaneous check to wait for startup; use a bounded retry or watcher.
Configuration steps#
- Add a Window › IF Window Exists command.
- Pick one or more windows/titles to check.
- Set retries and delay between tries if it opens slowly.
- (Optional) enable bring to front when found.
- Set IF/ELSE labels. Save.
Every option explained#
Expected result#
After execution, IF Window Exists completes the described action and makes its result available to the next step.
Real example#
Example: wait for the login window then continue#
- IF Window Exists, title contains "Sign in", 25 retries.
- Enable bring to front when found.
- IF label =
openedfor the form steps; ELSE =error.
Limitations and failure cases#
- The result is a point-in-time snapshot; changing titles, broad wildcards, or immediate closure can create races.
Tips & common mistakes#
This is a better "wait for the right moment" than a fixed delay — it only continues once the window truly appears.
Create the matching Label so the jump works.
Verification details#
commands/window.py
