如何正确编辑和 运行 新版本的 AutoHotKey 脚本?

How do I properly edit and run a new version of my AutoHotKey script?

我是 AHK 的新手。

我一直在玩 AHK,发现编译我的脚本的新版本很乏味。我觉得我做错了。

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.

然后就可以了。 我觉得好像我做错了,并且有一个正确的版本是真正的方法。任何帮助理解这一点都会有很大帮助。

提前致谢

你没有理由编译你的脚本。
编译是为了制作可移植的脚本,因此您可以 运行 在没有安装 AHK 的机器上编写脚本。
所以忘记编译吧。

编辑您的脚本(.ahk 文件)并保存,然后双击它。
您将收到一条提示,提示该脚本的旧版本已经 运行ning,单击“是”覆盖旧版本。
要不必在对话框中单击“是”,您可以在脚本顶部指定 #SingleInstance, Force。这样你就可以自动替换旧版本。

您拥有的 .bak 文件只是脚本的备份。
无论您使用何种编辑器编辑 .ahk 文件,都会为您创建该文件。所以它与您的 .ahk 文件是同一个文件,只是扩展名不同。该文件无特殊意义。
.ahk 文件只是文本文件,没有别的,您可以使用您选择的任何文本编辑器编辑它们。