DocsWindowClose Window

Automatically close a window in RunMacro

Desktop ModeRunMacro 3.5+

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

Dialog & quick setup

RunMacro Close Window command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Close Window command in RunMacro.
  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.

Options reference

Window title

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

Modes & when to use

Desktop Mode

Best for

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

Use an alternative when

  • Do not use it while the window has unsaved data or requires a separate confirmation flow.
Before you run
  • Add Close Window to the macro.
  • Prepare the data or target that Close Window will use.

Example workflow

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.
Expected result: After execution, Close Window completes the described action and makes its result available to the next step.

Tips & limitations

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.
  • The application can block the close request, show a confirmation dialog, or fail to match the target title.

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.