
Plain hotstrings such as ::btw::by the way are written the same way in AutoHotkey v1 and v2. What breaks is the code around them: v1 command syntax, hotstrings that end with return instead of braces, and directives that v2 removed. Add a #Requires line so the right version runs the file, then convert the hotstrings that run code. Hotstrings that only type text can also move to a text expander, so there is no script to maintain.
The broader comparison of scripts and text expanders is in an AutoHotkey alternative for text replacement. This guide is about the v1 to v2 change.
Why a working script stopped
AutoHotkey v2.0 was released on 20 December 2022, and the AutoHotkey website now treats v2 as the default version. As of October 2026, the latest v1.1 release on GitHub is v1.1.37.02 from March 2024.
v2 is not backwards compatible. Its commands became functions, so Send, text is now Send "text". A script written for v1 either needs the v1 interpreter or needs converting.
The v2 installer adds a launcher that chooses an interpreter for each script. It looks for a #Requires line first, then guesses from the syntax. The documentation lists the limits of that guess: it checks only the main file, and a script with mixed or broken syntax can be misidentified. When it cannot decide, it shows a menu by default.
What stays the same and what changes
The table covers the lines that most often stop a hotstring script from loading in v2. The full list is in the official changes from v1.1 to v2.0.
| In a v1 script | In v2 | Why |
|---|---|---|
::btw::by the way | No change | Auto-replace hotstrings keep their syntax |
#NoEnv | Delete the line | Removed; its behaviour is now the default |
SendMode Input | SendMode "Input" | Parameters are expressions, so text is quoted |
Send, Hello %name% | Send "Hello " name | No percent signs around variables; join text instead |
A body that ends with return | A body inside { } | Hotstrings that run code now define a function |
A signature hotstring in v1:
::sig::
Send, Best regards,{Enter}Jane
return
The same hotstring in v2:
::sig::
{
Send "Best regards,{Enter}Jane"
}
A date hotstring in v1:
::today::
FormatTime, Today,, yyyy-MM-dd
SendInput %Today%
return
In v2, FormatTime returns the text, and an empty first parameter means now:
::today::
{
SendInput FormatTime(, "yyyy-MM-dd")
}
The v2 hotstrings page uses the same pattern in its own date example.
Pin the version with #Requires
Put the version at the top of every script, so the launcher never has to guess:
- A converted script:
#Requires AutoHotkey v2.0 - An old script you are not converting yet:
#Requires AutoHotkey v1.1.33, with v1.1 installed as well. The v1 directive exists from v1.1.33 onwards, and the download page still offers v1.1.
Keeping v1 is a stopgap. Its last release came out in March 2024, so plan to convert or replace the script.
Converting a longer script
- Copy the
.ahkfile somewhere safe before you change anything. - Add
#Requires AutoHotkey v2.0and run it. If a line is wrong, v2 shows an error that names it. - Fix that line using the changes page, then run again.
- For a long file, the AutoHotkey documentation suggests tools such as the community AHK v2 Script Converter. Read its output before you trust it.
- Test each hotstring in Notepad before going back to real work.
Or move plain text out of the script
Many hotstring files are mostly text: an email address, a signature, standard replies. That part needs no code. A text expander keeps it as a list you edit in a window, with no syntax and no reload.
| AutoHotkey hotstrings | Text Replacements | |
|---|---|---|
| Adding an entry | Edit the script, save, reload | Add it in the app window |
| Ending characters | Space, Tab, Enter and punctuation such as . , ? by default | Space, Tab or Enter; an extended mode adds . , ! ? |
| Today’s date | FormatTime in code | {date:yyyy-MM-dd} in the text |
Options such as *, ?, C, X | Yes | No equivalent; keep these in AutoHotkey |
| Password fields | Only if your script checks for them | Blocked automatically |
| Price | Free and open source | $1.99 once, 7-day free trial |
To move the plain hotstrings:
- List the auto-replace hotstrings in a spreadsheet with two columns,
shortcutandreplacement. - Replace AutoHotkey syntax in the text, such as
{Enter}or`n, with real line breaks. - Save as CSV in UTF-8 and import it into Text Replacements. The guide to moving Word AutoCorrect shortcuts shows the CSV format.
- Once the imported shortcuts work, keep a copy of the
.ahkfile, delete the moved lines from it and reload it, so the two tools never react to the same trigger.
Hotstrings that run code, check which window is active or depend on hotstring options stay in AutoHotkey, now in v2 syntax.
Frequently asked questions
Do AutoHotkey v1 hotstrings work in v2?
Can AutoHotkey v1 and v2 run on the same PC?
Is AutoHotkey v1 still updated?
Can Text Replacements run my AutoHotkey scripts?
Keep code in AutoHotkey and move the plain text into a list you can edit without reloading a script.
Get Text Replacements