0
votes

I am new to AHK.

I have been playing around with AHK and have been finding the compiling of new verisons of my scripts tedious. I think I am doing it wrong.

I have the .ahk script, then the .bak script, then the .exe file under that

I right click on the .ahk script and selct edit script.

I edit, then save the file and close the window.

I right click on the .ahk script and select compile script.

I open task manager and close the old instance of my program (the .exe)

I then double click on the .ahk script, then double click on the .exe program.

It then works. I feel as though I am doing this badly wrong, and there is a proper version that is the real way to do it. Any help in understanding this would help a lot.

Thanks in advance

1

1 Answers

1
votes

There is no reason for you to compile your script.
Compiling is done to make portable scripts, so you could run the script on a machine that does't have AHK installed.
So just forget about compiling.

Edit your script (the .ahk file) save it, and then double click it.
You'll receive a prompt that an older version of that script is already running, click yes to override the older version.
To not have to click yes on a dialog, you can specify #SingleInstance, Force on top of your script. This way you automatically always replace the older version.

And the .bak file you have, is just a backup of your script.
Whatever editor you're using the edit the .ahk files is creating that file for you. So it's the same exact file as your .ahk file, but with just a different extension. The file has no special significance.
.ahk files are just text files, nothing else, you can edit them with any text editor of your choice.