Install AutoHotkey v2 (stable release 2.0.x) from autohotkey.com and create a script file with a .ahk extension
Activate the target window: WinActivate('Untitled - Notepad') — replace the title with the actual window title
Send keystrokes to the active window: Send('^a^c') to select all and copy; use Send('{Enter}') for the Enter key
Click UI controls by position or control class: Click(100, 200) for coordinate click; ControlClick('Button1', 'My App') to click a named control
Read control text: text := ControlGetText('Edit1', 'My App') to retrieve an edit field's content
Run the script with ahk.exe myscript.ahk; use MsgBox() calls for debugging output
Known gotchas
AutoHotkey v2 syntax is not backward compatible with v1; scripts written for v1 must be converted — use the official v1-to-v2 migration guide rather than a find-replace approach
SendMode 'Input' (the v2 default) is faster but may skip characters in some applications; switch to SendMode 'Event' for apps that use low-level keyboard hooks
UAC-elevated windows (running as Administrator) cannot be controlled by a non-elevated AHK script; run the script as Administrator when targeting privileged windows
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp