guide · static export
Productivity

Automate Repetitive Typing With AutoHotkey

Signatures, ticket numbers, awkward menu shortcuts - a ten-line script replaces all of them, and it starts with the system.

by@guidox updated:10/30/26 time:20 min level:Beginner tested on:Windows 11 24H2, AutoHotkey 2.0 works on:Windows 10, Windows 11 tools:AutoHotkey v2
TL;DR

Install **AutoHotkey v2**, write one `.ahk` file with **hotstrings** for text and **hotkeys** for actions, and put it in the **Startup** folder. Test in Notepad before using it in a real app.

Before you start

Requirements

  • AutoHotkey v2 from autohotkey.com
  • A text editor (Notepad is fine)
  • Ten minutes
Step by step

Instructions

01

Create the script file

Right-click on the desktop, choose **New > AutoHotkey Script** and open the file in a real editor. The default template is a comment header you can ignore.

02

Start with a hotstring

A hotstring triggers on typed text. The syntax is a double colon, the trigger, another double colon and the replacement in quotes. Type it anywhere and it expands.

::@@::you@example.com
::mfg::Mit freundlichen Grüßen
tipHotstrings fire on the closing character. Pick triggers you never type by accident.
03

Add a hotkey that does something

A hotkey binds keys to commands. **Send** types text, **Run** opens a program, **WinActivate** focuses a window. Two colons, the key, another two and the command.

#n::Run "notepad.exe"
^!s::Send "{Esc}"
04

Test in Notepad first

Right-click the script and choose **Run Script**. A green H icon appears in the tray. Test every hotstring in Notepad before you try it in a chat window or an IDE.

⚠ warningA hotstring typed in the wrong app can send half a sentence into a form. Test in a scratch buffer.
05

Survive reboots

Put a shortcut to the .ahk file in **shell:startup**. A script that has to be started by hand is a script you stop using after a week.

Win + R > shell:startup
06

Keep it small and versioned

One file, one purpose, a comment above each block. Copy it into your backup - it is the most valuable ten kilobytes on the machine.

Troubleshooting

Common issues

The script does nothing

It is not running, or it is running as v1 while the syntax is v2. Check the tray icon and the script's error window.

Hotstrings fire in games

Games read raw input, so hotstrings usually do not fire there at all. If they do, add **#IfWinActive** to limit the script to one window.

Antivirus blocks the script

Unsigned AutoHotkey scripts are often flagged. Compile it or whitelist the folder - do not disable the antivirus.

A hotkey stopped working after an update

Another app took the combination. Check the tray for overlay software and pick an unused prefix.

FAQ

Frequently asked

v1 or v2?

v2. New scripts should use it; v1 only matters for old code you find online.

Is this allowed in games?

Macros that play the game for you violate most anti-cheat rules. Typing helpers are a different thing.

How to undo this

Exit the script from the tray icon and remove the shortcut from **shell:startup**. Delete the .ahk file if you do not want it back.

Changelog · 1 entry
  1. 2026-10-30
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress