Sinisterly
.vbs script to toggle numlock, capslock, and scroll lock. - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: .vbs script to toggle numlock, capslock, and scroll lock. (/Thread-vbs-script-to-toggle-numlock-capslock-and-scroll-lock)



.vbs script to toggle numlock, capslock, and scroll lock. - Legit RnA - 08-26-2012

Very simple script... All it does is toggle the capslock, numlock, and scroll lock 5000 times with 10ms intervals. If you wish to change the speed and how many times the buttons activate, then just change the 5000 or 10 to something else. Just save as a .vbs file and then open it and it will work.
Happy Scripting Smile

Set wshShell =wscript.CreateObject("WScript.Shell")
Dim i
i=0
do while(i<=5000)
wscript.sleep 10
wshshell.sendkeys "{CAPSLOCK}"
wscript.sleep 10
wshshell.sendkeys "{NUMLOCK}"
wscript.sleep 10
wshshell.sendkeys "{SCROLLLOCK}"
i=i+1
loop