如何使用Notepad ++ Run ...功能添加默认扩展名?

湿蛋白

我经常使用notepad ++编辑我的AutoHotkey脚本。我喜欢使用记事本++>“运行”功能来测试它们并验证它们。

它运行良好,但是将它带入了更高的层次-当我进入运行>运行...> ...(以选择文件)>它会打开文件选择器窗口,默认情况下会查找exe文件。 ,.cmd,.bat等。我还如何寻找.ahk扩展名?总是不得不选择“所有文件”是非常荒谬的。如果这不是某个地方的隐藏功能,我将感到非常惊讶...

文件选择器示例

Anaksunaman

如果我超过了您在此答案中已经知道的所有内容,请原谅我。


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++

  1. Open RunRun... in Notepad++ (F5).

  2. 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)

Notepad ++ Run ...对话框-保存-屏幕截图

  1. A new dialog will open where you can give the saved command a name (required) and keyboard shortcut (optional). Click OK once you are done.

ex. Saving A Run... Command (Options)

Notepad ++ Run ...对话框-保存选项-屏幕截图

  1. You will be returned to the Run... dialog, which you can safely Cancel out of assuming you don't wish to run the current file at that moment.

ex. Saving A Run... Command (Finish)

Notepad ++运行...对话框-取消-屏幕截图

  1. You should now have a new option under Run which will allow you to run the current file open in Notepad++ (including .ahk files, with the caveats already noted.)

ex. Saved Run... Command

Notepad ++-已保存的运行...命令-屏幕截图

为了清楚起见,可以正常.ahk运行的脚本应仅在Windows通知区域中运行,而不能运行的脚本应显示正常的AutoHotkey错误对话框,详细说明遇到的任何问题。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类常见问题

如何添加可选的字符串扩展名?

来自分类Dev

使用file和awk添加文件扩展名

来自分类Dev

如何更改文件扩展名的默认图标?

来自分类Dev

如何使用Rails为所有迁移文件设置默认的'uuid-ossp'扩展名?

来自分类Dev

如何在CMFCEditBrowseCtrl :: EnableFileBrowseButton中设置默认文件扩展名?

来自分类Dev

使用.h扩展名

来自分类Dev

简单文件上传-如何添加.jpg扩展名

来自分类Dev

如何使用.htaccess添加文件类型扩展名?

来自分类Dev

删除扩展名并使用斜杠添加获取价值

来自分类Dev

如何使用Twig localizeddate扩展名在日期和小时之间添加一些文本

来自分类Dev

libgdx如何添加FreeType扩展名?

来自分类Dev

如何在gson中使用AutoValue扩展名添加二传手

来自分类Dev

如何批量添加文件扩展名?

来自分类Dev

使用打字稿时如何添加自定义扩展名

来自分类Dev

如何使用“ .htaccess”文件添加“ .php”扩展名

来自分类Dev

如何在多个子目录中使用python向文件添加扩展名

来自分类Dev

如何批量添加文件扩展名?

来自分类Dev

如何告诉Notepad ++始终使用带有特定文件扩展名的特定语言

来自分类Dev

Notepad ++中的默认保存扩展名

来自分类Dev

默认保存扩展名是“普通文本”,但Notepad ++正在保存而没有扩展名

来自分类Dev

如何更改文件扩展名的默认图标?

来自分类Dev

如何使用Rails为所有迁移文件设置默认的'uuid-ossp'扩展名?

来自分类Dev

使用相同的扩展名复制多个文件但添加日期

来自分类Dev

如何在Windows中使用ExifTool为多个文件添加缺少的文件扩展名

来自分类Dev

如何移动多个文件并添加.pgp扩展名?

来自分类Dev

在/ var / run中使用grep命令按文件扩展名搜索

来自分类Dev

如何将扩展名添加到未知扩展名文件

来自分类Dev

如何向其抓取的文件添加文件扩展名

来自分类Dev

如何添加文件扩展名而不是删除旧的扩展名

Related 相关文章

  1. 1

    如何添加可选的字符串扩展名?

  2. 2

    使用file和awk添加文件扩展名

  3. 3

    如何更改文件扩展名的默认图标?

  4. 4

    如何使用Rails为所有迁移文件设置默认的'uuid-ossp'扩展名?

  5. 5

    如何在CMFCEditBrowseCtrl :: EnableFileBrowseButton中设置默认文件扩展名?

  6. 6

    使用.h扩展名

  7. 7

    简单文件上传-如何添加.jpg扩展名

  8. 8

    如何使用.htaccess添加文件类型扩展名?

  9. 9

    删除扩展名并使用斜杠添加获取价值

  10. 10

    如何使用Twig localizeddate扩展名在日期和小时之间添加一些文本

  11. 11

    libgdx如何添加FreeType扩展名?

  12. 12

    如何在gson中使用AutoValue扩展名添加二传手

  13. 13

    如何批量添加文件扩展名?

  14. 14

    使用打字稿时如何添加自定义扩展名

  15. 15

    如何使用“ .htaccess”文件添加“ .php”扩展名

  16. 16

    如何在多个子目录中使用python向文件添加扩展名

  17. 17

    如何批量添加文件扩展名?

  18. 18

    如何告诉Notepad ++始终使用带有特定文件扩展名的特定语言

  19. 19

    Notepad ++中的默认保存扩展名

  20. 20

    默认保存扩展名是“普通文本”,但Notepad ++正在保存而没有扩展名

  21. 21

    如何更改文件扩展名的默认图标?

  22. 22

    如何使用Rails为所有迁移文件设置默认的'uuid-ossp'扩展名?

  23. 23

    使用相同的扩展名复制多个文件但添加日期

  24. 24

    如何在Windows中使用ExifTool为多个文件添加缺少的文件扩展名

  25. 25

    如何移动多个文件并添加.pgp扩展名?

  26. 26

    在/ var / run中使用grep命令按文件扩展名搜索

  27. 27

    如何将扩展名添加到未知扩展名文件

  28. 28

    如何向其抓取的文件添加文件扩展名

  29. 29

    如何添加文件扩展名而不是删除旧的扩展名

热门标签

归档