Move or resize a window
hs_move_windowPosition and resize a window by its ID using pixel coordinates. Receive the settled placement and an adjusted flag when macOS overrides the request.
Instructions
Set the position and/or size of a window by id, in screen pixels. Omitted fields keep their current value. The returned frame is read back after the move settles, so it is the real placement; adjusted=true means macOS or the app put the window somewhere other than requested. Use hs_screens to learn the available coordinate space.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| id | Yes | Window id from hs_list_windows. | |
| width | No | ||
| height | No |