AutoHotkey Plus Plus (AHK++)
AutoHotkey Plus Plus (AHK++) provides AutoHotkey language support for VS Code. This includes:
- code highlighting
- basic debug support
- code formatting
- ...and more!
Currently, AHK++ officially supports only AHK v1. AHK v2 will likely work, but please open issues and be patient if complex workflows are not supported. See issue 146: Support AHK v2
AHK++ is a fork of AutoHotkey Plus by cweijan, with the primary goal of fixing bugs and adding user-requested features.
View this README on the project site
Why AutoHotkey Plus Plus?
AutoHotkey Plus Plus is one of many extensions that offer VS Code language support. So why should you use this one?
- IntelliSense: Smart code completion, syntax highlighting, code navigation, and more.
- Actively Maintained: Any issues encountered while using this extension can be reported and fixed. With other extensions, anything that's broken will stay broken forever. You can report any issues with AHK++ (and view all issues) through the issue tracker.
- Debug Support: Run and debug AHK scripts from VS Code.
- New Features: Another benefit to active maintenance is that AHK++ can add new features as users request them.
Install from VS Code or install from VS Code Marketplace: Install AutoHotkey Plus Plus.
With AHK++, you can compile, debug, and run your scripts with keyboard shortcuts. You can also run a selection as a standalone script. Additionally, you can
Open Help with
Ctrl + F1.
Ctrl + Shift + F9
- Open Help:
Ctrl + F1
Ctrl + F9
- Run Selection:
Ctrl + F8
There are some known issues with the debugger. If you need an advanced setup, we recommend zero-plusplus.vscode-autohotkey-debug.
Click Run or press F9.
Debugger supports breakpoints, stack tracing, and variable watching
Output Message: You can use
OutputDebug command instead of
MsgBox to log values.
Evaluate: Set and get variable values through the debug console.
This extension provides basic debugging functions. If you need more debugging functions (such as conditional breakpoints), you can add an additional extension: Install vscode-autohotkey-debug.
Supports IntelliSense for variables and functions.
- You can add a comment to the function using a semicolon on the line above the function declaration
Go to Definition
- Supports navigation to symbol definition.
- Usage: Ctrl-click on the symbol to navigate to its definition.
Find Symbol References
Select a symbol, then:
- Right-click and select
Find All References.
- Or press
Shift + F12.
Usage: Hover over symbol to see IntelliSense documentation.
Assign name to block of code via double semicolon comment
;;Name and go to it from outline.
Custom folding regions:
MsgBox % "Collapse me!"
; Block comments with regions
There are some known issues with the formatter, and we're always working to improve.
Supports standard VS Code formatting with a few options.
Formatter directives instruct the formatter to behave a certain way on sections of code.
;All text inside block comment will be formatted like regular code.
a = 5 ; number five
str = legacy text = with equal symbol
inputFile := "movie.mkv"
abc := "abc" ; string
abc := a + b