The handle of the window to access.
The handle of the control to move or resize.
The new X coordinate of the control.
The new Y coordinate of the control.
The new width of the control. Default is -1 (no change).
The new height of the control. Default is -1 (no change).
1 if successful, 0 otherwise.
import { ControlMoveByHandleSync, ControlGetHandleSync, WinGetHandleSync } from '@ahmic/autoit-js';
const windowHandle = WinGetHandleSync('Untitled - Notepad');
const controlHandle = ControlGetHandleSync(windowHandle, 'Edit1');
ControlMoveByHandleSync(windowHandle, controlHandle, 100, 100, 200, 50);
Moves and resizes a control in a window.