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