Tuesday, December 13, 2016
Cool VBScript Prank
Cool VBScript Prank
One day I was looking at vbs file which auto type in notepad, and then I got idea to modify it and making it little bit crazier.
I added some new functions and methods to the script, try it Im sure youll like it.
What this script will do:
Itll first start your browser then will type some urls then play with your browsers TAB, at the end itll start Microsoft speech engine and gives audio message to your friend about the prank.
Download this file "Browser_Prank.vbs"
Browser_Prank.vbs
or
Copy this code below and paste to notepad then save as "Browser_Prank.vbs"
How it is working:
This script using mainly three methods Run, SendKeys and sleep.
The things youll note here that script is sending some special key combination for browser shortcut key like Ctrl+TAB to switch between tabs.
There are some methods described with their purpose:
It is working almost with every modern browser and windows operating system that allows VBScript execution.
Try it and have fun.
I added some new functions and methods to the script, try it Im sure youll like it.
What this script will do:
Itll first start your browser then will type some urls then play with your browsers TAB, at the end itll start Microsoft speech engine and gives audio message to your friend about the prank.
Download this file "Browser_Prank.vbs"
Browser_Prank.vbs
or
Copy this code below and paste to notepad then save as "Browser_Prank.vbs"
################################################################
File: Browser_Prank.vbs
Author: 5um17
URL: http://www.secretsofgeeks.com
Launch browser, open sites, switch tabs, show msgbox, speak msg.
Modify and redistribute the script but leave this attribution here.
################################################################
WScript.Sleep 5000
Set oShell = WScript.CreateObject("WScript.Shell")
oShell.Run "http://www.google.com/"
WScript.Sleep 2000
oShell.AppActivate "http://www.google.com/"
WScript.Sleep 1000
oShell.SendKeys "^t"
WScript.Sleep 1000
oShell.SendKeys "http://by-nick.blogspot.com/"
oShell.SendKeys "~"
WScript.Sleep 1000
oShell.SendKeys "^t"
WScript.Sleep 1000
oShell.SendKeys "http://www.facebook.com/SOCGs"
oShell.SendKeys "~"
WScript.Sleep 3000
oShell.SendKeys "^{TAB}"
WScript.Sleep 500
oShell.SendKeys "^{TAB}"
WScript.Sleep 500
oShell.SendKeys "^{TAB}"
WScript.Sleep 500
oShell.SendKeys "^{TAB}"
WScript.Sleep 500
oShell.SendKeys "^{TAB}"
WScript.Sleep 500
oShell.SendKeys "^{TAB}"
WScript.Sleep 500
oShell.SendKeys "^{TAB}"
WScript.Sleep 500
oShell.SendKeys "^{TAB}"
WScript.Sleep 500
return=msgbox("So Do you want somthing more ? click OK :-D",48,"msg by nick")
CreateObject("SAPI.SpVoice").Speak "Its ok. Prank by Secrets of Computer Geeks"
##### End
How it is working:
This script using mainly three methods Run, SendKeys and sleep.
The things youll note here that script is sending some special key combination for browser shortcut key like Ctrl+TAB to switch between tabs.
There are some methods described with their purpose:
Sleep 5000 | : initially we call this method for start execution after some time of launching the script. Time is in milliseconds (5000 = 5 sec) |
Run http://www.google.com/ | : starting default browser and displaying initial page. |
SendKeys "^t" | : special key CTRL+T for opening new tab in browser. |
SendKeys "~" | : for sending ENTER |
msgbox | : displaying a popup message box. |
CreateObject("SAPI.SpVoice").Speak | : object creation for speech engine and calling of speak method for making windows to speak. |
It is working almost with every modern browser and windows operating system that allows VBScript execution.
Try it and have fun.
Available link for download