Assign VBS Script to a Keyboard Shortcut

后端 未结 1 1114
我寻月下人不归
我寻月下人不归 2020-12-18 06:27

I have a very basic VBS script that I plan on using frequently on my Windows 7 machine. Is there any way I can bind it to a keyboard shortcut so I don\'t have to navigate to

相关标签:
1条回答
  • 2020-12-18 06:50

    Windows does have built-in support for shell shortcut keys, where a keypress is used to invoke an *.lnk file that launches your VBScript (using either cscript or wscript).

    Create a shortcut file, have it invoke your VBScript file directly or run cscript or wscript with the appropriate arguments, then save it and open its Properties sheet and set a keystroke in the "Shortcut key" field (I suggest something like Ctrl+Alt+K).

    Like so:

    Then, whenever you press Ctrl+Alt+K, regardless of the active application, your script will be invoked.

    A more heavy-duty alternative is AutoHotKey: http://www.autohotkey.com/

    0 讨论(0)
提交回复
热议问题