Returns information about the currently active (foreground) window,
or null if no window is focused.
Finds all visible windows matching the given filter criteria.
Object with optional title and/or process filters.
An array of matching WindowInfo objects. Empty array if none match.
Brings the specified window to the foreground.
The id from a WindowInfo object.
true if the window was successfully focused.
Moves and optionally resizes a window.
The id from a WindowInfo object.
New left edge X coordinate in pixels.
New top edge Y coordinate in pixels.
Optionalw: numberNew width in pixels. Omit to keep the current width.
Optionalh: numberNew height in pixels. Omit to keep the current height.
true if the operation succeeded.
Sends a close request (WM_CLOSE) to the specified window. The window may prompt the user before closing.
The id from a WindowInfo object.
Registers a callback that fires whenever a different window becomes the foreground window. The script enters an event loop and stays alive as long as this handler is registered.
Handler receiving the newly activated window's WindowInfo.