I am trying to set keyboard combination for a .lnk
shortcut using vbs. For some reason the 'shortcut key' section will not accept emulated letter key presses. All I get is pause
key. For some reason Enter
key as well as Tab
, Esc
work, meaning I can switch to next line or close shortcut properties altogether. Please adivise.
This is the VBS script I am using.
set WshSHell = Wscript.CreateObject("WScript.Shell")
WshShell.SendKeys "{1}" *for simplicity I named the shortcut "1"*
WshShell.SendKeys "+{F10}" *emulates righ-click*
WshShell.SendKeys "{UP}" *select 'Properties'*
WshShell.Sendkeys"{ENTER}"
WScript.Sleep 500 *wait fo window to pop-up*
WshShell.SendKeys "{TAB 2}" *switch to 'shortcut key' line*
WshShell.SendKeys "{G}" *error*
WshShell.SendKeys "{ENTER}"