AutoHotkey is a scripting engine that allows Windows users to create custom hotkey bindings and run macros for automation tasks.
See backlinks for specific use cases.
Quick start
Install via WinGet by winget install -e --id AutoHotkey.AutoHotkey
Create a .ahk file anywhere on the system. It’s a good idea to put a header in the file that enables the v2.0 scripting language:
#Requires AutoHotkey v2.0
; the rest of the scriptRun on start up
To have the script run on start-up, open Windows Explorer and enter shell:startup into the address bar. Right click the .ahk file created above, then right-click drag into the shell:startup folder, and create a shortcut. Feel free to rename the shortcut.
Custom tray icon
Normally, the running script will be visible in the system tray area with a green “H” icon (i.e. the default AutoHotkey icon). Hovering over the icon shows the name of the script, but sometimes it’s nicer to differentiate scripts by the icon itself. We can customise the icon by adding a line to our .ahk script above:
TraySetIcon("SomeIcon.ico")Create or download a .ico file and put it in the same location as the .ahk script. Ensure the .ico filename above lines up correctly, and the script should now appear in the system tray with the custom icon.