The handle of the window to access.
The handle of the control to interact with.
The string of text to send.
The send mode to use. See SendMode
for details. Default is SendMode.Default
.
1 if successful, 0 otherwise.
import { ControlGetHandle, ControlSendByHandle, SendMode, WinGetHandle } from '@ahmic/autoit-js';
const windowHandle = WinGetHandle('Untitled - Notepad');
const controlHandle = ControlGetHandle(windowHandle, 'Edit1');
ControlSendByHandle(windowHandle, controlHandle, 'Hello, World!', SendMode.Default);
Sends a string of text to a control in a window.