Sunday 11 December 2011

Toggle кεƴ♭ø@яḓ Lights

| |



On a typical keyboard, there are three led's for number lock, caps and scroll lock respectively. This is a trick to dance your PC keyboard lights in a regular manner using a simple piece of code. This is a visual basic script with extension ( .vbs ) All you have to do is open notepad, copy the following script into it and save it with file name extension .vbs

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
save it as any file name u want with extension  .vbs        for example (abc.vbs)
 To start the keyboard disco dance, you need to double click on the saved file. The above code makes led to dance in a regular manner.
The sleep code determines the delay for lighting. It's better to have all lights off before starting the script to make the dance more effective. To end the script, you need to terminate a process called wscript.exe. For this , open windows task manager by pressing CTRL+ALT+DEL and click process tab. select the process and click end task. 

0 comments:

Post a Comment

Social Profiles

Animated Social Gadget - Blogger And Wordpress Tips