Blogger Widgets

About Ash Hacker

My photo
I am a social-techno-learner which believes in its own efficiency first and then implements with the suggestions of my strong and enthusiastic Team which helps me takes everything into its perfection level.

Thursday, 19 January 2012

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 discussing a small script, which will toggle caps lock key infinitely. It is VB Script which will toggle caps lock 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.

Follow the Steps Given Below :

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

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

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
do while(i<=50)
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"

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

No comments:

Post a Comment


You Are Welcome Heartly.......
Blogger Widgets