Close Window
window_closeCloses an active macOS window via its accessibility close button. Requires confirmation to avoid losing unsaved changes.
Instructions
Close a window by pressing its AXCloseButton. Destructive — unsaved changes in the window may be lost. Requires Accessibility permission.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Must be true to execute this destructive action. | |
| windowHandle | Yes | A windowHandle from window_list or window_get_active. |