如果我超过了您在此答案中已经知道的所有内容,请原谅我。
How can I also have it look for
.ahk
extensions?
Offhand, I am not aware of a way to affect the file picker dialog in Notepad++ to add default executable extensions.
I regularly use Notepad++ for editing my AutoHotkey scripts. I like to use the Notepad++ Run feature to test them and validate them.
Assuming that:
You aren't selecting files other than the ones you are currently working on in Notepad++ (i.e. the ones you have open).
The files you are working on have an .ahk
extension and have been saved at least once.
You have registered the .ahk
extension with AutoHotkey in Windows.
There should be no need modify the file picker dialog. Notepad++ has the ability to save Run... commands, including some very generic ones.
In particular, Notepad++ has a variable called $(FULL_CURRENT_PATH)
which is populated either once a file is saved or if a file is opened from a previously saved file. You can use this variable in conjunction with the Run... command to run the current file, including .ahk
scripts (which should, again, be possible if the .ahk
extension is registered with AutoHotkey in Windows).
Running AutoHotkey Scripts In Notepad++
Open Run → Run... in Notepad++ (F5).
In the Run... dialog box, type "$(FULL_CURRENT_PATH)"
and then click Save
. Note that the double-quotes are to ensure that paths with spaces work correctly.
ex. Saving A Run... Command (Save)
OK
once you are done.ex. Saving A Run... Command (Options)
Cancel
out of assuming you don't wish to run the current file at that moment.ex. Saving A Run... Command (Finish)
.ahk
files, with the caveats already noted.)ex. Saved Run... Command
为了清楚起见,可以正常.ahk
运行的脚本应仅在Windows通知区域中运行,而不能运行的脚本应显示正常的AutoHotkey错误对话框,详细说明遇到的任何问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句