While You Can Use an External File to Save Your Script Defaults, You Can Also Call-on the Windows Registry to Store App Settings
In most cases, I’ve used a separate file (text or INI) to save settings. While this works well, it requires the creation and tracking of that independent file. For the script to read the settings, it must know where to locate that file. But, if you want to save script settings without the baggage of that extra file, then consider using your Windows Registry.
You’ll find a few advantages to maintaining your script settings in the Windows Registry:
- Unlike a separate settings file, you don’t need to keep track of the Windows Registry’s location—it never moves. Regardless of where you locate your AutoHotkey script on your computer, you will always find its settings in the exact same place.
- You won’t accidentally lose your settings by manually deleting what may seem like an extra file in Windows File Explorer.
- Your settings remain semi-hidden from public view in a semi-permanent form.
This approach to storing your script defaults deep inside the recesses of Windows adds an air of mystery to your apps—especially if you compile them into EXE files. Continue reading