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

    Function ControlGetFocusByHandleSync

    • Gets the ID of the control that has keyboard focus in a window.

      Parameters

      • windowHandle: bigint

        The handle of the window to access.

      Returns string

      The ID of the control that has keyboard focus.

      import { ControlGetFocusByHandleSync, WinGetHandleSync } from '@ahmic/autoit-js';

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

      const id = ControlGetFocusByHandleSync(windowHandle);

      console.log(id); // Output: "Edit1"