While the AutoHotkey FileInstall Command Works Great When Packaging External Files inside Compiled EXE Files, You Can Also Package and Extract Data and Text Files with Uncompiled AHK Script Files
In Chapter Six and Chapter Thirty-eight of the book AutoHotkey Applications, I discuss using the FileInstall command when combining various types of support files (e.g. jpg, wav, ini) into one compiled EXE file. Upon loading the app for the first time, a double-click of the left mouse button extracts the embedded files and places each at its proper location on the drive. After downloading an AutoHotkey app, this command alleviates the need to keep track of each external file required by the package. However, the FileInstall command only works for compiled EXE files.
Due to the ever-present risk from computer viruses, it gets harder and harder to send and download EXE files. Both Web and computer security systems give user warnings—if they don’t outright block all EXE files. The safest and easiest way to share AutoHotkey apps is through the text-based .ahk script files which contain only human-readable code. (Users can later compile the script themselves.) If you want to include more files than merely the AutoHotkey script, you can package all the pieces inside a ZIP file for later unzipping. But, if you want to include a text-based data or ReadMe.txt file for the AutoHotkey app which automatically extracts into the working folder, then you can use the following technique—no FileInstall command required.
Continue reading →
Like this:
Like Loading...