Migrate an AutoHotkey v1 script to v2 syntax without breaking hotkeys and functions
domain: autohotkey.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Read the official 'Changes from v1.1 to v2.0' migration page before editing anything
Replace command-syntax calls with function-call syntax, e.g. 'Sleep, 1000' becomes 'Sleep 1000', since all v2 parameters are expressions rather than plain text
Replace legacy assignments like 'var = text' with 'var := "text"'
Convert '#If' directive blocks to the v2 HotIf function family (HotIf, HotIfWinActive, HotIfWinExist, etc.) since #If became #HotIf
Remove obsolete v1 boilerplate such as #NoEnv and SetBatchLines, which are defaults or unrecognized in v2
Rewrite old command-syntax %var% text-mode dereferencing inside former commands as direct v2 expressions
Known gotchas
There is no official automated converter that fully handles this migration reliably; manual review after any auto-convert pass is expected
Legacy conditional commands like IfWinExist/IfEqual are removed entirely in v2 — only 'if expression' remains
Command-syntax habits such as a leading comma or bare text arguments silently produce syntax errors rather than runtime errors in v2
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?