Docs

RunMacro Documentation

Learn RunMacro from basics to advanced.

Everything you need to start and master RunMacro — from basic commands to advanced automation workflows.

RunMacro robot
Docs Window Window Watcher
👁 Window

Watch for a window in the background and act when it appears (RunMacro)

Window Watcher periodically scans for a window title while the workflow runs; on a match it can bring it forward, then Stop, Pause, Close Window, Run Macro, or Go to Label.

Prerequisites

  • You know the exact (or partial) title of the window to watch.
  • Running in Desktop mode.

Supported modes

  • Desktop ModeWatches system windows on Windows.

What it does

The Window Watcher command runs in the background alongside your workflow: every interval it scans open windows for the title(s) you declare. On a match it can bring the window forward and run the action you choose — stop, pause, close the window, run a macro, or jump to a label.

When to use it

  • Auto-close an unexpected dialog or pop-up when it appears mid-run.
  • Stop or pause the workflow when an error window shows up.
  • Run a dedicated handler macro when a target window is seen.
  • Jump to a handling branch when a named window is detected.

When not to use it

  • You only need a one-time check and branch — use IF Window Exists.
  • The window has no stable title to identify it.

Configuration steps

  1. Add a Window › Window Watcher command.
  2. Enter one or more window titles to watch.
  3. Set the scan interval (seconds).
  4. Choose whether to bring the window forward when found.
  5. Pick an Action: Stop, Pause, Close Window, Run Macro, or Go to Label.
  6. For Run Macro, point to the handler macro file; for Go to Label, enter the label name. Save.

Every option explained

Window title(s) to watch

One or more window titles. The watcher scans them in order and stops at the first match.

Scan interval (seconds)

How often to scan while the workflow runs. Default is 10 seconds.

Bring forward when found

If on, the matched window is restored and brought to the foreground before the action runs.

Action

What to do on a match: Stop, Pause, Close Window, Run Macro, or Go to Label.

Handler macro / Target label

Path to a handler macro (when Action = Run Macro) or a label name (when Action = Go to Label).

Expected result

While the workflow runs, when a matching window appears RunMacro performs the configured action.

Real example

Example: auto-close an update pop-up

  1. Window Watcher: title = "Update Available", scan every 5 seconds.
  2. Enable "Bring forward", Action = Close Window.
  3. Run your main workflow — when the pop-up appears, the watcher closes it.

Limitations and failure cases

  • Detection is title-based; highly variable titles are hard to match.
  • The scan interval is in seconds, so there is some latency.

Tips & common mistakes

This command holds the configuration; the periodic scanning is performed by the macro runner in the background while the workflow runs.
Unlike IF Window Exists (a one-time check that branches), the Watcher monitors continuously throughout the run.

Verification details

  • commands/window.py
RunMacro robot

Ready to automate smarter?

Download RunMacro and start automating your desktop, browser, and business workflows today.