AutoHotkey Tutorial
What is AutoHotkey
AutoHotkey is a keyboard macro software for Microsoft Windows. It is free.
For example, you can:
- Set F8 to launch browser, and just switch to it if it is already running.
- Set F3 to Copy, F4 to Paste, F12 to close a browser tab.
- Swap Alt and Ctrl keys.
- Disable ❖ Window key, or CapsLock, NumLock, ScrollLock keys, or make them do something useful.
- Set a key to insert today's date.
- Set a key to insert template text, such as your address.
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](i/ahk_script_2022-12-03_c293d.png)
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](i/ahk_exit_2021-02-14.png)
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 📦 .