The handle of the window to access.
The handle of the control to send the command to.
The command to send to the control.
Optional additional parameter for the command.
The size of the buffer to store the result.
The result of the command as a string.
import { ControlCommandByHandle, WinGetHandle, ControlGetHandle } from '@ahmic/autoit-js';
const windowHandle = WinGetHandle('Untitled - Notepad');
const controlHandle = ControlGetHandle(windowHandle, 'Edit1');
const result = ControlCommandByHandle(windowHandle, controlHandle, 'IsVisible');
console.log(result); // Output: "1" if visible, "0" otherwise
Sends a command to a control in a window.