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.

Docs Window Close Window
❌ Window

Automatically close a window in RunMacro

The Close Window command finds a window by its title and sends a close request (like clicking the X).

Prerequisites#

  • Add Close Window to the macro.
  • Prepare the data or target that Close Window will use.

Supported modes#

  • Desktop Mode

What it does#

The Close Window command finds a window by its title and sends a close request (like clicking the X). Use it to tidy up windows or shut an app during a workflow.

Screenshots & video#

RunMacro Close Window command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Close Window command in RunMacro.

When to use it#

  • Close a pop-up ad/notification window.
  • Shut an app after finishing.
  • Clear an old window before opening a new one.

When not to use it#

  • Do not use it while the window has unsaved data or requires a separate confirmation flow.

Configuration steps#

  1. Add a Window › Close Window command.
  2. Pick the target window from the list (or type the title, use * for partial matches).
  3. Save. On run, RunMacro sends a close request to that window.

Every option explained#

Window title#

The window to close. Pick from open windows or type it; supports * and ? wildcards.

Expected result#

After execution, Close Window completes the described action and makes its result available to the next step.

Real example#

Example: close a Notepad window#

  1. Add Close Window.
  2. Choose the window whose title contains "Notepad".
  3. Save and run — the Notepad window closes.

Limitations and failure cases#

  • The application can block the close request, show a confirmation dialog, or fail to match the target title.

Tips & common mistakes#

Use * when the title varies, e.g. *Notepad to match any open file.
If the app asks to save on close, add a dialog-handling step (Click/Key) after this command.

Verification details#

  • commands/window.py
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.