AHK ConverterConvert AutoHotkey v1 scripts to v2, inspect dependencies, manage libraries, and get AHK-aware Copilot help inside VS Code.
What It DoesAHK 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.
Highlights
Quick Start
Core WorkflowsConvert AHK v1 to v2Run one of the conversion commands:
Default shortcuts:
Use The AHK SidebarOpen the AHK icon in the VS Code activity bar for the bundled workflow views:
Ask Copilot With
|
| 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