Tuesday, July 27, 2010

Turn your keyboard lights to disco

Ever wondered that the keyboard lights can be turned rhythmically on/off using some code. So here is what will put an end to your curiosity. These codes when executed makes your Caps Lock, Num Lock and Scroll lock keys flash in a random or sequential manner.

How to do this:

1.  Open notepad & enter following codes(each code in different notepad) and save the file as "Anyname.vbs" and then open that file.
2. This code makes your keyboard light to turn on/off in a random manner.
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
wshshell.sendkeys "{NUMLOCK}"
wshshell.sendkeys "{SCROLLLOCK}"
loop
3.This code makes it a sequential chain of light....
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 200
wshshell.sendkeys "{CAPSLOCK}"
wscript.sleep 100
wshshell.sendkeys "{NUMLOCK}"
wscript.sleep 50
wshshell.sendkeys "{SCROLLLOCK}"
loop
4. Now to stop the lights from blinking, open task manager and then under "Processes" end the process wscript.exe.


Thanks for Stopping by Tech75. You can leave a comment to let me know your feedback and can also subscribe to the RSS feeds for regular updates.

No comments:

Post a Comment

Related Posts with Thumbnails
Top Internet blogs

Pages

Subscribe @ Techphilia

Enter your email address:

Delivered by FeedBurner

Pages

Indulge in Techphilia

 Techno Galaxy with some tips and tricks and latest offering from Internet

Latest @ TechPhilia