Illustrated desk with a laptop showing a colourful code editor, an open toolbox, a screwdriver and a notebook with a flow diagram

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 scriptIn v2Why
::btw::by the wayNo changeAuto-replace hotstrings keep their syntax
#NoEnvDelete the lineRemoved; its behaviour is now the default
SendMode InputSendMode "Input"Parameters are expressions, so text is quoted
Send, Hello %name%Send "Hello " nameNo percent signs around variables; join text instead
A body that ends with returnA 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

  1. Copy the .ahk file somewhere safe before you change anything.
  2. Add #Requires AutoHotkey v2.0 and run it. If a line is wrong, v2 shows an error that names it.
  3. Fix that line using the changes page, then run again.
  4. For a long file, the AutoHotkey documentation suggests tools such as the community AHK v2 Script Converter. Read its output before you trust it.
  5. 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 hotstringsText Replacements
Adding an entryEdit the script, save, reloadAdd it in the app window
Ending charactersSpace, Tab, Enter and punctuation such as . , ? by defaultSpace, Tab or Enter; an extended mode adds . , ! ?
Today’s dateFormatTime in code{date:yyyy-MM-dd} in the text
Options such as *, ?, C, XYesNo equivalent; keep these in AutoHotkey
Password fieldsOnly if your script checks for themBlocked automatically
PriceFree and open source$1.99 once, 7-day free trial

To move the plain hotstrings:

  1. List the auto-replace hotstrings in a spreadsheet with two columns, shortcut and replacement.
  2. Replace AutoHotkey syntax in the text, such as {Enter} or `n, with real line breaks.
  3. Save as CSV in UTF-8 and import it into Text Replacements. The guide to moving Word AutoCorrect shortcuts shows the CSV format.
  4. Once the imported shortcuts work, keep a copy of the .ahk file, 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?
Plain auto-replace hotstrings such as ::btw::by the way are written the same way in both versions. Hotstrings that run commands need v2 syntax: braces around the body, quoted text and functions instead of commands.
Can AutoHotkey v1 and v2 run on the same PC?
Yes. The v2 installer’s launcher picks an interpreter for each script, from a #Requires line or by checking the syntax. If it cannot tell, it asks you by default.
Is AutoHotkey v1 still updated?
The AutoHotkey website treats v2 as the main version. As of October 2026, the latest v1.1 release on GitHub is v1.1.37.02 from March 2024, while v2.0 updates continue.
Can Text Replacements run my AutoHotkey scripts?
No. It replaces a trigger with saved text, with optional date and time macros. Hotstrings that run code, check windows or use options such as * or ? should stay in AutoHotkey.

Keep code in AutoHotkey and move the plain text into a list you can edit without reloading a script.

Get Text Replacements