Retrieves the position and size of a window.
The handle of the window.
An IRect object containing the position and size of the window.
IRect
import { WinGetHandleSync, WinGetPosByHandleSync } from '@ahmic/autoit-js';const windowHandle = WinGetHandleSync('Untitled - Notepad');const rect = WinGetPosByHandleSync(windowHandle);console.log(rect); // Output: { left: 100, top: 100, right: 200, bottom: 200 } Copy
import { WinGetHandleSync, WinGetPosByHandleSync } from '@ahmic/autoit-js';const windowHandle = WinGetHandleSync('Untitled - Notepad');const rect = WinGetPosByHandleSync(windowHandle);console.log(rect); // Output: { left: 100, top: 100, right: 200, bottom: 200 }
https://www.autoitscript.com/autoit3/docs/functions/WinGetPos.htm
Retrieves the position and size of a window.