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

    Function ControlFocusByHandleSync

    • Sets the focus to a control in a window.

      Parameters

      • windowHandle: bigint

        The handle of the window to access.

      • controlHandle: bigint

        The handle of the control to focus.

      Returns number

      1 if success, 0 if failure.

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

      const windowHandle = WinGetHandleSync('Untitled - Notepad');
      const controlHandle = ControlGetHandleSync(windowHandle, 'Edit1');

      ControlFocusByHandleSync(windowHandle, controlHandle);