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

    Function ControlCommandByHandle

    • Sends a command to a control in a window.

      Parameters

      • windowHandle: bigint

        The handle of the window to access.

      • controlHandle: bigint

        The handle of the control to send the command to.

      • command: Command

        The command to send to the control.

      • option: string = ''

        Optional additional parameter for the command.

      • characterCount: number = 1024

        The size of the buffer to store the result.

      Returns Promise<string>

      A promise that resolves to the result of the command as a string.

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

      const windowHandle = await WinGetHandle('Untitled - Notepad');
      const controlHandle = await ControlGetHandle(windowHandle, 'Edit1');
      const result = await ControlCommandByHandle(windowHandle, controlHandle, 'IsVisible');

      console.log(result); // Output: "1" if visible, "0" otherwise