@ahmic/autoit-js
    Preparing search index...

    Function ControlGetPosByHandle

    • Gets the position of a control in a window, relative to the window itself.

      Parameters

      • windowHandle: bigint

        The handle of the window to access.

      • controlHandle: bigint

        The handle of the control to get the position for.

      Returns Rect

      The position of the control as a Rect object.

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

      const windowHandle = WinGetHandle('Untitled - Notepad');
      const controlHandle = ControlGetHandle(windowHandle, 'Edit1');

      const rect = ControlGetPosByHandle(windowHandle, controlHandle);

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