Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AHK ConverterNew to Visual Studio Code? Get it now.
AHK Converter

AHK Converter

DB Cooper

|
549 installs
| (0) | Free
This tool helps convert outdated AHK v1 to modern AHK v2 automatically along with other tools like dependency mapping, package management, and a built-in Copilot Chat participant.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AHK Converter icon

AHK Converter

Convert AutoHotkey v1 scripts to v2, inspect dependencies, manage libraries, and get AHK-aware Copilot help inside VS Code.

VS Code Marketplace Installs AutoHotkey v2 VS Code License

VS Code Extension AHK v1 to v2 Dependency Map Copilot Chat


What It Does

AHK Converter started as a focused AutoHotkey v1-to-v2 conversion tool. It now adds the missing VS Code workflow around that conversion: dependency mapping, package discovery, library includes, interpreter-backed diagnostics, and an AHK-focused Copilot Chat participant.

Convert Understand Build
Convert v1 scripts into v2 output, replace the current file, or review a diff. Browse symbols, includes, library relationships, and diagnostics from dedicated sidebar views. Search AHK v2 libraries, insert #Include lines, generate metadata, and ask @ahk for code help.

Highlights

New tab conversion Replace file conversion Diff review Batch conversion

AHK sidebar Code Map Package search Quick include

Interpreter diagnostics DllCall signatures Function metadata Library attribution

@ahk convert @ahk fix @ahk workspace @ahk examples

Quick Start

  1. Install AutoHotkey v2.
  2. Install the extension from the VS Code Marketplace.
  3. Recommended: install AutoHotkey v2 Language Support by thqby for syntax highlighting and LSP features.
  4. Open a .ahk file.
  5. Run AHK: Convert v1 to v2 from the Command Palette, editor context menu, or keyboard shortcut.

Core Workflows

Convert AHK v1 to v2

Run one of the conversion commands:

Command Use When
AHK: Convert to v2 (New Tab) You want to inspect converted output without touching the source file.
AHK: Convert to v2 (Replace File) You are ready to update the current file.
AHK: Convert to v2 (Show Diff) You want side-by-side review before accepting changes.
AHK: Convert to v2 (Batch) You are converting multiple scripts at once.

Default shortcuts:

  • Ctrl+Shift+A: convert to a new tab.
  • Ctrl+Shift+D: show conversion diff.

Use The AHK Sidebar

Open the AHK icon in the VS Code activity bar for the bundled workflow views:

View Purpose
Toolbox Quick actions, settings, and common AHK development commands.
Dependency Manager Search, install, update, remove, and include AHK libraries.
Code Map Browse symbols and jump through the active script structure.
Dependency Map Inspect #Include relationships and unresolved dependencies.

Ask Copilot With @ahk

When GitHub Copilot Chat is available, type @ahk in chat:

Command What It Does
@ahk /convert Convert a v1 snippet and explain the migration.
@ahk /fix Analyze active code, Problems diagnostics, and likely AHK v2 issues.
@ahk /explain Explain an AHK v2 concept or syntax pattern.
@ahk /example Generate a focused AHK v2 example.
@ahk /codemap Summarize symbols in the active file.
@ahk /dependencies Summarize include relationships.
@ahk /workspace Combine code map and dependency context.
@ahk /syntax Look for v1 contamination and v2 syntax problems.
@ahk /refactor Suggest safer structure and modern v2 idioms.
@ahk /test Draft tests and edge cases for functions.

You can also ask normal questions, such as:

@ahk why is this GUI not showing?
@ahk convert this hotkey block to v2
@ahk explain ComObject vs ComObjActive

Settings

Common settings:

Setting Purpose
ahkConverter.autoHotkeyV2Path Path to AutoHotkey64.exe. Empty uses PATH.
ahkConverter.converterScriptPath Path to the bundled or custom v1-to-v2 converter script.
ahkConverter.strictWindowsOnly Warn when running outside Windows.
ahkConverter.enableEnhancedDiff Enable the enhanced conversion diff view.
ahkConverter.defaultOutputNaming Choose suffix, directory, or prompt naming for batch conversion.
ahkConverter.validationLevel Use strict, normal, or lenient validation.
ahkv2Toolbox.includeFormat Template for inserted #Include paths.
ahkv2Toolbox.userLibraryPaths Local library folders to index for quick includes.
ahkv2Toolbox.userLibraryIncludeFormat Template used when inserting user-library includes.

Documentation

  • Package Search Guide
  • Best OOP Examples
  • Dependency Tree Active File Mode
  • JSDoc Generation Guide
  • Advanced Features
  • Roadmap
  • Changelog

Troubleshooting

AutoHotkey v2 executable not found

Install AutoHotkey v2, then set ahkConverter.autoHotkeyV2Path if AutoHotkey64.exe is not on PATH.

Converter script not found

Leave ahkConverter.converterScriptPath on the default bundled path unless you intentionally use a custom converter.

The AHK sidebar is missing

Reload VS Code after installing or updating the extension. The activity bar item is titled AHK and uses the extension's sidebar icon.

Copilot commands do not respond

Make sure GitHub Copilot Chat is installed and active, then type @ahk in the Copilot Chat input.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft