AutoHotkey: Text Expansion and Hotkeys That Save Hours Every Week

AutoHotkey: Text Expansion and Hotkeys That Save Hours Every Week

📎 This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 27 September 2026

How many times a day do you type your email address, a standard reply, or today’s date? AutoHotkey is a free Windows tool that turns short abbreviations into full text and any key combination into an action.

In this article
  1. Install and create a script
  2. A starter script
  3. How it works
  4. Try it yourself: step by step

Install and create a script

  1. Download AutoHotkey v2 from autohotkey.com and install it.
  2. Right-click the desktop → New → AutoHotkey Script, name it my-shortcuts.ahk.
  3. Right-click it → Edit, paste the script below, save, then double-click the file to run it.

A starter script

#Requires AutoHotkey v2.0

; ---- Text expansion: type the abbreviation followed by space or Enter
::@@::[email protected]
::brb::be right back
::thx::Thanks for the quick response — I will review and revert shortly.

; ---- Insert today's date when you type ;dt
:X:;dt::SendText FormatTime(, "dd-MMM-yyyy")

; ---- Hotkeys: ^ = Ctrl, ! = Alt, + = Shift, # = Windows key
^!e::Run "excel.exe"          ; Ctrl+Alt+E opens Excel
^!n::Run "notepad.exe"        ; Ctrl+Alt+N opens Notepad
#!c::                         ; Win+Alt+C: copy selected text as plain text
{
    A_Clipboard := ""
    Send "^c"
    if ClipWait(1)
        A_Clipboard := A_Clipboard   ; strips formatting
}

How it works

  • ::abbr::text is a hotstring: type the abbreviation and an ending key and it is replaced.
  • :X: makes the hotstring execute code instead of typing text — here it types the formatted date.
  • ^!e:: is a hotkey: the action after :: runs when you press the combination.
💡 Put a shortcut to your .ahk file in the Startup folder (press Win+R, type shell:startup) so it runs every time Windows starts.
⚠️ Some company PCs block AutoHotkey. Check with IT first, and never put passwords in an .ahk file — it is plain text.

Try it yourself: step by step

  1. Install AutoHotkey v2, then download my-shortcuts.ahk.
  2. Right-click it → Edit (or open in Notepad) and change [email protected] to your email. Save.
  3. Double-click the file — a green “H” icon appears in the system tray.
  4. Open Notepad and type @@ then a space: it becomes your email. Type ;dt and a space: today’s date appears.
  5. Press Ctrl+Alt+N to open Notepad from anywhere. Right-click the tray icon → Exit to stop the script.

📎 Practice files for this article

  • ⌨️
    Starter AutoHotkey scriptNeeds AutoHotkey v2. Edit the email and phrases, then double-click to run.
    ⬇ AHK · 428 B

Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.