; bench_roundtrip.ahk ; Phase 0 step 4 โ€” drive the AC client through char-select โ†’ in-world โ†’ clean quit, ; without a human watching. Logs to artifacts/phase0/ahk_roundtrip.log. ; ; Run with: AutoHotkey64.exe bench_roundtrip.ahk #Requires AutoHotkey v2.0 #SingleInstance Force WinTitle := "Asheron's Call" LogFile := "C:\Users\acbot\leakhunt\artifacts\phase0\ahk_roundtrip.log" Log(msg) { global LogFile FileAppend Format("[{1}] {2}`n", FormatTime(A_Now, "yyyy-MM-dd HH:mm:ss"), msg), LogFile } Log("script start") if not WinWait(WinTitle, , 30) { Log("FATAL: AC window not found within 30s") ExitApp 1 } Log("AC window found") WinActivate WinTitle Sleep 1500 if not WinActive(WinTitle) { Log("WARN: WinActivate did not bring AC to foreground; trying ControlSend fallback") } ; Phase A: if at char-select, Enter selects the default (only) character and enters world. ; If we're already in-world (memory >800 MB suggested by the supervisor probe), Enter opens ; chat which we'll close immediately. SendInput "{Enter}" Log("sent Enter #1 (char-select confirm or chat-open)") Sleep 2000 ; Phase B: send Escape to dismiss any modal/chat that may have opened. Harmless if no modal. SendInput "{Esc}" Log("sent Escape (dismiss modal/chat)") Sleep 800 ; Phase C: small movement step to satisfy "walk one step" requirement (Phase 0 ยง4). ; W is the AC default forward-walk bind in most layouts. Hold 250 ms. SendInput "{w down}" Sleep 250 SendInput "{w up}" Log("sent W pulse (walk one step)") Sleep 1000 ; Phase D: clean quit. AC supports @quit chat command to log out to character select. ; Then we send /quit again from char-select to terminate the client process gracefully. SendInput "{Enter}" ; open chat Sleep 200 SendInput "@quit" Sleep 200 SendInput "{Enter}" Log("sent @quit (logout-to-char-select)") Sleep 4000 ; If still alive at char-select: ask the launcher menu to exit the client. ; AC's exit-to-desktop on char-select is typically Escape -> Yes-to-exit confirmation. SendInput "{Esc}" Sleep 600 SendInput "{Enter}" ; default focus on "Quit" or "Yes" Log("sent Escape + Enter (exit from char-select)") Sleep 1500 Log("script end") ExitApp 0