AutoHotkey Tutorial

By Xah Lee. Date: . Last updated: .
AutoHotkey logo nz9fX

AutoHotkey is a keyboard macro software for Microsoft Windows. It is free.

For example, you can:

Download AutoHotkey

Download at

Create Script

To create a AHK script, type the following text into a file, save and name it test.ahk

; launch Notepad
Run Notepad

AutoHotkey language words are not case sensitive. Run is the same as run.

Run Script

To run ahk script, double click it.

ahk script 2022-12-03 c293d
ahk script 2022-12-03

Exit AutoHotkey

Right-click on the AutoHotkey icon in taskbar, and pull a menu to exit the script.

If you exit, your hotkeys will not work anymore.

ahk T2Y6Q
A running AutoHotkey script icon in Taskbar's System Notification Area.
AutoHotkey System Notification Area
AutoHotkey System Notification Area

Start an AutoHotkey Script When Windows Starts

AutoHotkey mode for Emacs

If you use Emacs, you can use a AutoHotkey mode i wrote. It fixes some problems i found in the bundled ahk mode. Get it at Emacs: Xah AutoHotkey Mode .

AutoHotkey Tutorial

AutoHotkey logo nz9fX

Key Syntax

Useful Scripts