close_window
Closes a Windows window safely by sending WM_CLOSE only after verifying it still matches the expected title and process, preventing accidental closure of a changed window.
Instructions
Close a window safely (WM_CLOSE after verification — never blind Alt+F4). Pass expect_title/expect_process to refuse (409) if the window changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hwnd | Yes | ||
| expect_title | No | ||
| expect_process | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |