Windows

Where Does AutoHotkey Look for Scripts?

AutoHotkey runs a default script when launched bare. Where it looks for AutoHotkey.ahk and where to put startup shortcuts.

Last updated

When you launch AutoHotkey with no script argument, it looks for a file named AutoHotkey.ahk. It checks the folder containing the AutoHotkey executable first, then your Documents folder. The Documents copy is the one most installs create, at %USERPROFILE%\Documents\AutoHotkey.ahk.

The name follows the exe name. Run AutoHotkey64.exe bare and it looks for AutoHotkey64.ahk in those same spots. In practice it is easier to double click a specific .ahk file or pass its path on the command line than to rely on the default name.

Where AutoHotkey stores this, by platform

Windows
%USERPROFILE%\Documents\AutoHotkey.ahk

This is the fallback script for a bare launch. Scripts can live anywhere; double click any .ahk file to run it. For logon startup, put a shortcut in the folder opened by shell:startup rather than editing this default.

Frequently asked questions

how do i run an autohotkey script at startup

Place a shortcut to your .ahk file in the Startup folder. Press Win+R, type shell:startup, and drop the shortcut there. The script then runs at every logon without touching the default file.

how do i tell which script is currently running

Open the script's tray icon menu and choose the option that shows the main window. The window title shows the full path of the running script, which settles the question in seconds.

Notice an outdated path? Let us know.