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

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 Mode — Watches 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
- Add a Window › Window Watcher command.
- Enter one or more window titles to watch.
- Set the scan interval (seconds).
- Choose whether to bring the window forward when found.
- Pick an Action: Stop, Pause, Close Window, Run Macro, or Go to Label.
- For Run Macro, point to the handler macro file; for Go to Label, enter the label name. Save.
Every option explained
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
- Window Watcher: title = "Update Available", scan every 5 seconds.
- Enable "Bring forward", Action = Close Window.
- 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
Verification details
commands/window.py
RunMacro