run_ahk
Execute AutoHotkey scripts to automate desktop interactions like background input and hotkeys, capturing output and return codes.
Instructions
Run an inline AutoHotkey script and capture its output.
The script MUST terminate (call ExitApp, or be non-persistent) or it runs until the timeout. Emit output with FileAppend to the target "*" (stdout). AHK is ideal for reliable background input (ControlSend/ControlClick) and real hotkeys.
Args: params (RunAhkInput): script source, optional args, timeout, optional exe path.
Returns: str: JSON {"ok": bool, "returncode": int, "stdout": "...", "stderr": "...", "exe": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |