-
Notifications
You must be signed in to change notification settings - Fork 0
AutoHotkey
AutoHotkey (AHK) is a powerful complement: its ControlSend/ControlClick drive
background windows very reliably (better than raw PostMessage for many apps),
and run_ahk is a full scripting escape hatch.
winget install -e --id AutoHotkey.AutoHotkeyThe server auto-detects AHK on PATH, in common install dirs, or via the
LOWLEVEL_CU_AHK environment variable (set it to an AutoHotkey*.exe path to pin a
specific interpreter). Generated helpers target AHK v2; run_ahk runs whatever
interpreter is found.
→ {installed, path, version} or {installed:false, hint}.
Send text to a window by HWND (no focus needed):
ahk_control_send { "text": "hello", "window": "ahk_id 0x1A2B3C" }Target by process or title instead:
ahk_control_send { "text": "hello", "window": "ahk_exe notepad.exe" }Send key syntax instead of literal text (as_keys):
ahk_control_send { "text": "^a{Del}", "window": "ahk_exe notepad.exe", "as_keys": true }-
windowis an AHK target string:"ahk_id <hwnd>","ahk_exe <exe>", or a title. -
control(optional) targets a specific control; blank = the window's focused control.
The script must terminate (call ExitApp, or be non-persistent) or it runs until
the timeout. Emit stdout with FileAppend ..., "*".
run_ahk { "code": "ControlSendText \"hi\", , \"ahk_exe notepad.exe\"\nExitApp" }Parameters: code, args (passed to the script), timeout (default 60),
exe_path (override interpreter). Returns {returncode, stdout, stderr, exe}.
Use AHK when an app ignores Win32 PostMessage/WM_CHAR (see the limitations in
Background Targeting). ControlSend works for many such apps. For everything
else, the built-in win_set_control_text / background type_text are simpler.
lowlevel-computer-use-mcp · MIT License ·
Getting started
Reference
Features
More
ahk_status {}