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

    Function ControlCommandByHandleSync

    • 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 string

      The result of the command as a string.

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

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

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