Function WinGetPosByHandle

  • Retrieves the position and size of a window.

    Parameters

    • windowHandle: bigint

      The handle of the window.

    Returns IRect

    The position and size of the window as a IRect object.

    import { WinGetHandle, WinGetPosByHandle } from '@ahmic/autoit-js';

    const windowHandle = WinGetHandle('Untitled - Notepad');

    const rect = WinGetPosByHandle(windowHandle);

    console.log(rect); // Output: { left: 100, top: 100, right: 200, bottom: 200 }