DocsWindowIF Window Exists

Branch on whether a window exists in RunMacro

Desktop ModeRunMacro 3.5+

The IF Window Exists command checks whether one (or more) windows with given titles are open, retrying until found.

Dialog & quick setup

RunMacro IF Window Exists command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the IF Window Exists command in RunMacro.
  1. Add a Window › IF Window Exists command.
  2. Pick one or more windows/titles to check.
  3. Set retries and delay between tries if it opens slowly.
  4. (Optional) enable bring to front when found.
  5. Set IF/ELSE labels. Save.

Options reference

Titles to check (one or more)

The windows to look for; matching any title counts as existing. Wildcards supported.

Retries + delay between tries (ms)

Repeats the check until a window appears or retries run out.

Bring to front when found

When found, restore and focus that window.

IF label / ELSE label

If it exists jump to IF; if not found after retries jump to ELSE.

Modes & when to use

Desktop Mode

Best for

  • Wait for an app/dialog to open before acting.
  • Verify a successful login (main window appears).
  • Branch differently depending on which window is open.

Use an alternative when

  • Do not use an instantaneous check to wait for startup; use a bounded retry or watcher.
Before you run
  • Add IF Window Exists to the macro.
  • Prepare the data or target that IF Window Exists will use.

Example workflow

Example: wait for the login window then continue

  1. IF Window Exists, title contains "Sign in", 25 retries.
  2. Enable bring to front when found.
  3. IF label = opened for the form steps; ELSE = error.
Expected result: After execution, IF Window Exists completes the described action and makes its result available to the next step.

Tips & limitations

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.
  • The result is a point-in-time snapshot; changing titles, broad wildcards, or immediate closure can create races.

Applies to RunMacro 3.5+ · Desktop Mode · Windows 10/11

RunMacro robot

Robots do the work. Your time is yours.

Create a robot in minutes, no coding needed. Reliable execution, remote management, transparent costs — and you always stay in control.