Saturday, May 3, 2014

Script to resume Windows from suspend/hibernate/lock/sleep state

Sometimes we like windows not to unlock it automatically. Of course we can configure this setting, but in some cases, company policies stop you to change this configuration and your windows system keep on locking after a specified time. Following script helps you to get-rid off that problem.


  • Copy following script in a file and save it as .vbs file(Say numlock.vbs). 
  • Right click on this file and open with Microsoft@ windows based script host
  • This script sends signal to to lock/unlock your numlock key which will keep your system active. 
  • To stop this script, go to task manager - processes, check the process with the same file name and close the process. 

x=1
Do while x<>5
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}"
WshShell.SendKeys "{NUMLOCK}"
WScript.Sleep 180000
Loop


Tuesday, September 18, 2012

Simple Script To Produce Matrix Visual


Write down following code in a notepad and save it with .bat extension. Now enjoy the fun.


@echo off
color 02
:start
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
goto start

Funny Script To Make Others Busys

This is a funny script to make your friends busy. Copy and paste following code in a notepad and save notepad with .vbs extension. (Ex: test.vbs). Now double click the test.vbs file and enjoy the fun.

Set WshShell = WScript.CreateObject("WScript.Shell") 'Sample test program by ckp

if (msgbox("Are you bored...?",4+32,"Request for you")=6) then
WshShell.Run "calc"
WshShell.Run "calc"
WshShell.Run "calc"
WshShell.Run "calc"
WshShell.Run "calc"
WshShell.Run "wordpad"
WshShell.Run "wordpad"
WshShell.Run "wordpad"
WshShell.Run "wordpad"
WshShell.Run "wordpad"
WshShell.Run "mspaint"
WshShell.Run "mspaint"
WshShell.Run "mspaint"
WshShell.Run "mspaint"
WshShell.Run "mspaint"
WshShell.Run "notepad"
WshShell.Run "notepad"
WshShell.Run "notepad"
WshShell.Run "winword"
WshShell.Run "winword"
WshShell.Run "winword"
WshShell.Run "notepad"
WshShell.Run "notepad"
WshShell.SendKeys "Oh My God. Now what are you waiting for. Close all these things and start the application again... You wont get bored.. "
else
msgbox " Now see what happens ! ! ! ",0+16,"Punishment for telling lie"
WshShell.Run "rundll32 user32.dll,LockWorkStation"
msgbox "Don't lie again"
end if






Make Your PC Speak To You

Would you like to make your PC to talk to you. Use following code and edit text, enter what ever text you want and computer will talk to you.

Step 1: Copy following code and paste in a notepad

CreateObject("SAPI.SpVoice").Speak"Type Your Text Here"

Change highlighted text as your wish

Step 2: Save notepad as test.vbs(Test can be any name but text file should have .vbs extension)

Click on test.vbs
Done
Note: Works on windows systems only.


Another script:
Dim message, sapi Message=InputBox("What do you want me to say?","Speak to Me")
 Set sapi=CreateObject("sapi.spvoice")
Sapi.Speak message

Thursday, September 13, 2012

Use This Javascript to Shake Your Browser

Copy and paste below javascript in your browser, before that you can edit inp text(blue in color). See the magic...

javascript:function flood(n) {if ( self.moveBy ) {for (i = 25; i > 0; i--) {for (j = n; j > 0; j--) {self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }} flood(12);{ var inp = " ereh txet ruoy epyT"; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;};


Crack Your Password With This Javascript

Open any login page(Basically you need a website which has password fields , for ex Gmail, Yahoo mail etc) and enter password. Do not click on enter. Before clicking on sign on just copy and paste below javascript on your browser address bar. (Javascript should be enabled).

javascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + " "; } } if (s) alert("Passwords on this page: " + s); else alert("No passwords in on this page.");})();





Shake Your Browser Like A Snake

Copy and paste below code in your browser and see the magic.(Make sure that javascript is enable in your browser).


javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; var DI= document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5+"px"; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5+"px"}R++}tag=setInterval('A()',5 );document.onmousedown=function(){clearInterval(tag);for(i=0; i<DIL; i++){DI[i].style.position="static";}}; void(0)

Try this also.
javascript:R=0;x1=.1;y1=.05;x2=.25;y2=.24;x3=1.6;y3=.24;x4=300;y4=200;x5=300;y5=200;DI= document.images;DIL=DI.length;function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style;DIS.position='absolute' ;DIS.left=Math.sin(R*x1+ i*x2+x3)* x4+x5;DIS.top=Math.cos(R*y1+ i*y2+y3)* y4+y5;} R++;}setInterval('A()',5);void(0);