AutoHotkey Tutorial

By Xah Lee. Date: . Last updated: .

What is AutoHotkey

AutoHotkey logo nz9fX

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

For example, you can:

Download AutoHotkey

Download at http://www.autohotkey.com/

Create Script

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

; launch Notepad
Run Notepad

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.

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 .