A Utility to easily manage which version of AutoHotkey that uncompiled scripts use.
If you are an end-user, simply download AHK-EXE-Swapper.exe from here. You may place it anywhere.
Double click the script to open the GUI.
This script maintains a Library of versions which you have imported or backed up which it stores in the folder AHK-EXE-Swapper in your AutoHotkey folder (C:\Program Files\AutoHotkey).
Library Management To add a Release version (ie one from the main page of the AHKScript Website) , Install it using the regular AHK Installer and hit Backup Version in the script's GUI.
To add a Test version (ie one Lexikos posted in a forum thread), download the zip from the link and place it in the Import folder in the AHK-EXE-Swapper folder. Then, click Refresh in the GUI, select the zip file from the list and click Import.
Swapping To swap Version (version number), Select a version from the Library and click Replace with selected version To swap Variant (ANSI/Unicode, x86/x64), Click the buttons at the top.
The obvious caveat for a script like this is "How do you delete AutoHotkey.exe if you are running a script using it?"
The obvious answer is "Compile the script", but this leaves you with how to debug or work on the script (either without a dubugger, or with) without having to compile it for each run.
This project includes two methods to circumvent this issue:
- When run as uncompiled, the script will check to see if the used AHK EXE is the "Main" exe, and if so will try to copy an "Internal EXE" to a subfolder and relaunch using that. Simple solution for people without debuggers etc.
- A
SciTE.properties
file is included with the project which will redirect SciTE4AutoHotkey to use the "Internal EXE" when running or debugging the script.
If you run the .ahk version of the script once outside of SciTE, the "Internal EXE" will be put in the correct folder for you. Then simply uncomment the contents ofSciTE.properties
and start debugging!