Close window
Closes the front window of the front app, or of the app you name.
Close the front window of app
Keyboard Maestro: ManipulateWindow CloseWindow
Details #
Presses the close button of the front window. The app stays open, even if that was its last window. If the document has unsaved changes, the app asks first, just as when you click the red button.
The step fails with "this window has no close button" for windows that do not have one, such as some panels.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
app | text | The app, by bundle id or name. Defaults to the front app. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
Close the front window of TextEdit
Do
- Close the window in TextEdit
Gotchas #
A save prompt stays open and waits for you. The step does not answer it. Follow it with Click on the prompt's button if you want it answered.
With no
app, it closes whatever window is in front when the step runs.