One of the very useful AutoHotkey features is the ability to add/modify scripts on the fly. This tutorial is for those who are constantly editing their AutoHotkey file, adding new scripts or modifying existing ones.
Adding or modifying a script in your AHK file is a three-step process (edit, save, reload). The two scripts presented below will help you do it quicker. The first will be to edit, and the second to save and reload.
Prepare your overlay
Choose two unassigned keys on the Enterpad where you will assign the two shortcuts. Name them something appropriate, like “Edit” and "Save&Reload".
Copy and paste the following script in the AutoHotkey script template (Enterpad.ahk) at the location of the first key you wish to assign.
001: Edit Return
Do the same with the following script at the location of the second key you wish to assign.
002: Send ^s Reload Return
If you want to make sure the "Save&Reload" script has enough time to save before reloading, you can add a pause between the save and reload commands in your script, like this:
001: Send ^s Sleep, 1000 Reload Return
If there is an error in your edited script and you press the "Save&Reload" button, a dialog box with information about the error will appear. In such a case, the old version of the script will remain operative.