Hello friends, I have written a mini book on Cyber Security awareness for you, named "Hacking into Hackers' Head". This book uses common terms to explain things, and I'm sure you will get benefitted from it in your day to day life. It's available on Kindle and Google Play. Grab your copy now.

Monday, November 21, 2011

Toggle caps lock automatically

Hello Friends, I think all of you have seen disco light effect in which light is turning on/off continuously. Today I am going to tell a small VB script, which will toggle caps lock key infinitely at interval of 0.1 sec. You can perform the same with other keys like Num lock and Scroll lock.
I am performing with Caps lock because an LED Glows with Caps lock On and you can see effect of disco light with it or you can irritate your victim by installing this script at start-up.

See this post for performing with other keys, that will turn your keyboard into dancing light.

Follow the Steps Given Below :

1.) Open Notepad and copy the script given below into your notepad.


Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop


2.) wscript.sleep 100 : Here 100 is the sleep interval between toggle in milliseconds

3.) Now Save it with extension as .vbs , like "script.vbs"

4.) Run it & see the magic.

Note : You can change the do loop to For loop. You can edit the Do Loop to control it with a counter Variable.

Below is a Modified Script which will toggle Caps Lock 50 times :



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


You are done. Double click on this batch file to toggle your caps lock.
Enjoy Hacking.

No comments:

Post a Comment

We appreciate your valuable comments.

Scroll to Top