I have created a script to remap the Windows Button to right-mouseclick.
How can I create an executable AutoHotkey file that I can offer for download, that automatically runs only that script?
Why not use Ahk2exe? According to its docs, you can use it in three ways:
- GUI Interface: Run the "Convert .ahk to .exe" item in the Start Menu.
- Right-click: Within an open Explorer window, you can right-click any .ahk file and select "Compile Script" (only available if the script compiler option was chosen when AutoHotkey was installed). This creates an EXE file of the same base filename as the script, which appears after a short time in the same directory. Note: The EXE file is produced using the same custom icon, .bin file and use MPRESS setting that were last used by Method #1 above.
Command Line: The compiler can be run from the command line with the following parameters:
Ahk2Exe.exe /in MyScript.ahk [/out MyScript.exe] [/icon MyIcon.ico] [/bin AutoHotkeySC.bin] [/mpress 0or1]
For example:
Ahk2Exe.exe /in "MyScript.ahk" /icon "MyIcon.ico"
Usage: Parameters containing spaces should be enclosed in double quotes. If the "out" file is omitted, the EXE will have the same base filename as the script itself.