How to make AutoHotkey scripts work on computers without AutoHotkey installed


Normally to open a .ahk file you will need to have installed AutoHotkey and then it will appear in the taskbar.

However recently I found a .exe file that was actually an auto hotkey script and it added the script to the taskbar when I opened it. I'm assuming that this did not need AutoHotkey installed.

How would I go about making a .exe file (or some other method) in order to run my script on computers that do not have AutoHotkey installed?

Best Answer

AutoHotKey includes a script compiler with it's installer.

There are a few ways to use the script compiler:

  • Run the convert .ahk to .exe Start Menu item under the AutoHotKey folder.
  • Right Click in Explorer any .ahk file and select Compile Script. This method is only available if you selected the compiler during installation.
  • Use the Command Line:

Ahk2Exe.exe /in MyScript.ahk [/out MyScript.exe] [/icon MyIcon.ico] [/bin AutoHotkeySC.bin] [/mpress 0or1]


Ahk2Exe.exe /in "MyScript.ahk" /icon "MyIcon.ico"


Related Question