The handle of the window to access.
The handle of the control to enable.
1 if success, 0 if failure.
import { ControlDisableByHandle, ControlEnableByHandle, ControlGetHandle, WinGetHandle } from '@ahmic/autoit-js';
const windowHandle = WinGetHandle('Untitled - Notepad');
const controlHandle = ControlGetHandle(windowHandle, 'Edit1');
// Disable the Notepad window's edit control.
ControlDisableByHandle(windowHandle, controlHandle);
// Enable the Notepad window's edit control.
ControlEnableByHandle(windowHandle, controlHandle);
Enables a control in a window.