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

  1. Read the official 'Changes from v1.1 to v2.0' migration page before editing anything
  2. 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
  3. Replace legacy assignments like 'var = text' with 'var := "text"'
  4. Convert '#If' directive blocks to the v2 HotIf function family (HotIf, HotIfWinActive, HotIfWinExist, etc.) since #If became #HotIf
  5. Remove obsolete v1 boilerplate such as #NoEnv and SetBatchLines, which are defaults or unrecognized in v2
  6. Rewrite old command-syntax %var% text-mode dereferencing inside former commands as direct v2 expressions

Known gotchas

Related routes

Write AutoHotkey v2 scripts for window targeting, hotkeys, and GUI automation
autohotkey.com · 5 steps · unrated
Migrate a Pipedrive integration from API v1 to v2
pipedrive.readme.io · 4 steps · unrated
Migrate OPA Rego policies from v0 syntax to Rego v1 syntax using the if and contains keywords
security/compliance · 5 steps · unrated

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?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans