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?
AutoHotkey is a free and open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and software automation that allows users of most levels of computer skill to automate repetitive tasks in any Windows application.
Ahk2Exe is the official AutoHotkey script to EXE converter, which is written itself in AutoHotkey.
And that's just how simple it is to use the portable version of AutoHotkey; you can use it on any computer without installing!
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.
Just want to add that, quoting from Convert a Script to an EXE (Ahk2Exe):
Once a script is compiled, it becomes a standalone executable; that is, AutoHotkey.exe is not required to run the script. The compilation process creates an executable file that contains the following: the AutoHotkey interpreter, the script, any files it includes, and any files it has incorporated via the FileInstall command. [v1.1.33+]: Additional files can be included using compiler directives.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With