[Mark F.] wrote-:
-------- snip ------------------------------------------------------------
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%windir%\notepad.exe"
objShell.AppActivate "Notepad"
objShell.SendKeys "{CAPSLOCK}"
This will just toggle the CapsLock state so if caps lock is on, then this will
disable it !
To OP, use AutoHotKey. Install:
http://www.autohotkey.com
And use this script:
;---------------
state := GetKeyState("Capslock", "T")
SetCapsLockState , On
RunWait, notepad ; < program path here
SetCapsLockState, % state ? "on" : "off" ; < restore the previous state
;---------------
Good Luck, Ayush.