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

    Function ControlSendByHandleSync

    • Sends a string of text to a control in a window.

      Parameters

      • windowHandle: bigint

        The handle of the window to access.

      • controlHandle: bigint

        The handle of the control to interact with.

      • value: string

        The string of text to send.

      • mode: SendMode = SendMode.Default

        The send mode to use. See SendMode for details. Default is SendMode.Default.

      Returns number

      1 if successful, 0 otherwise.

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

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

      ControlSendByHandleSync(windowHandle, controlHandle, 'Hello, World!', SendMode.Default);