Sets the focus to a control in a window.
The handle of the window to access.
The handle of the control to focus.
1 if success, 0 if failure.
import { ControlFocusByHandleSync, ControlGetHandleSync, WinGetHandleSync } from '@ahmic/autoit-js';const windowHandle = WinGetHandleSync('Untitled - Notepad');const controlHandle = ControlGetHandleSync(windowHandle, 'Edit1');ControlFocusByHandleSync(windowHandle, controlHandle); Copy
import { ControlFocusByHandleSync, ControlGetHandleSync, WinGetHandleSync } from '@ahmic/autoit-js';const windowHandle = WinGetHandleSync('Untitled - Notepad');const controlHandle = ControlGetHandleSync(windowHandle, 'Edit1');ControlFocusByHandleSync(windowHandle, controlHandle);
https://www.autoitscript.com/autoit3/docs/functions/ControlFocus.htm
Sets the focus to a control in a window.