VBscript fun!

Feb 27, 2009

Heres a few .vbs scripts i found. All you have to do it copy and paste the code into notepad and save it as "any name".vbs
where "any name" is put whatever you want to save it as, just make sure it has .vbs on the end

Disco on your keyboard



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



to end the script press CRTL+ALT+DEL go to the processes tab and end wscript

Make the computer talk



strText = "your message here"
Set objVoice = CreateObject("SAPI.SpVoice")
objVoice.Speak strText



Where the text "your message here" is type what you want the computer to say. This process ends by itself

Make the computer go "ding" then popup a messege





Set objVoice = CreateObject("SAPI.SpVoice")
Set objFile = CreateObject("SAPI.SpFileStream.1")

objFile.Open "c:\Windows\Media\Ding.wav"
objVoice.Speakstream objFile
Wscript.Echo "your message here"



where the "c:\windows\Media\Ding.wav" put what sound file you want to be played. I think it only likes .wav i havent tryed out .wma or .mp3 yet. Also where it says "your message here" is the message that gets dispalyed after the sound

Make the Microsoft Office assistant popup and say something



On Error Resume Next

strAgentName2 = "MERLIN"
strAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".acs"
Set objAgent2 = CreateObject("Agent.Control.2")

objAgent2.Connected = TRUE
objAgent2.Characters.Load strAgentName2, strAgentPath2
Set objPeter = objAgent2.Characters.Character(strAgentName2)

objPeter.MoveTo 700,300
objPeter.Show

objPeter.Play "GetAttention"
objPeter.Play "GetAttentionReturn"

objPeter.Speak("your message here")

Wscript.Sleep 1000

Set objAction= objPeter.Hide

Do While objPeter.Visible = True
Wscript.Sleep 250
Loop


This script ends by itself. where it says "your message here" type what you want it to say.

Error message



lol = msgbox("your message here")


where it say your message here type what the error message should say



A Scribbling Notepad


save the below code as note.vbs and then execute it and see wat hpns

it will not harm u

Set wshshell = wscript.CreateObject("WScript.Shell")
Wshshell.run "Notepad"
wscript.sleep 400
wshshell.sendkeys "H"
wscript.sleep 100
wshshell.sendkeys "i"
wscript.sleep 200
wshshell.sendkeys " "
wscript.sleep 200
wshshell.sendkeys "I"
wscript.sleep 200
wshshell.sendkeys " "
wscript.sleep 100
wshshell.sendkeys "a"
wscript.sleep 100
wshshell.sendkeys "m"
wscript.sleep 200
wshshell.sendkeys " "
wscript.sleep 100
wshshell.sendkeys "R"
wscript.sleep 100
wshshell.sendkeys "i"
wscript.sleep 100
wshshell.sendkeys "t"
wscript.sleep 100
wshshell.sendkeys "e"
wscript.sleep 100
wshshell.sendkeys "s"
wscript.sleep 100
wshshell.sendkeys "h"
wscript.sleep 200
wshshell.sendkeys " "
wscript.sleep 100
wshshell.sendkeys "K"
wscript.sleep 100
wshshell.sendkeys "a"
wscript.sleep 100
wshshell.sendkeys "w"
wscript.sleep 100
wshshell.sendkeys "a"
wscript.sleep 100
wshshell.sendkeys "d"
wscript.sleep 100
wshshell.sendkeys "k"
wscript.sleep 100
wshshell.sendkeys "a"
wscript.sleep 100
wshshell.sendkeys "r"


Agent Prank


On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs"
Set objAgent2 = CreateObject("Agent.Control.2")
ObjAgent2.Connected = TRUE
ObjAgent2.Characters.Load strAgentName2, strAgentPath2
Set objPeter = objAgent2.Characters.Character(strAgentName2)
ObjPeter.MoveTo 700,300
ObjPeter.Show
ObjPeter.Play "GetAttention"
ObjPeter.Play "GetAttentionReturn"
ObjPeter.Speak("Hi I'm merlin here to take control of your computer")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs"
Set objAgent2 = CreateObject("Agent.Control.2")
ObjAgent2.Connected = TRUE
ObjAgent2.Characters.Load strAgentName2, strAgentPath2
Set objPeter = objAgent2.Characters.Character(strAgentName2)
ObjPeter.MoveTo 700,300
ObjPeter.Show
ObjPeter.Play "GetAttention"
ObjPeter.Play "GetAttentionReturn"
ObjPeter.Speak("downloading virus . . . 20% . . . 40% . . . 60% . . . 80% . . . 100% virus downloaded")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs"
Set objAgent2 = CreateObject("Agent.Control.2")
ObjAgent2.Connected = TRUE
ObjAgent2.Characters.Load strAgentName2, strAgentPath2
Set objPeter = objAgent2.Characters.Character(strAgentName2)
ObjPeter.MoveTo 700,300
ObjPeter.Show
ObjPeter.Play "GetAttention"
ObjPeter.Play "GetAttentionReturn"
ObjPeter.Speak("watch as I open your cd drive")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100



Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.CdromCollection

If colCDROMs.Count >= 1 then
For I = 0 to colCDROMs.Count - 1
ColCDROMs.Item(I).Eject
Next ' cdrom
End If


Wscript.Sleep 100
On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs"
Set objAgent2 = CreateObject("Agent.Control.2")
ObjAgent2.Connected = TRUE
ObjAgent2.Characters.Load strAgentName2, strAgentPath2
Set objPeter = objAgent2.Characters.Character(strAgentName2)
ObjPeter.MoveTo 700,300
ObjPeter.Show
ObjPeter.Play "GetAttention"
ObjPeter.Play "GetAttentionReturn"
ObjPeter.Speak("lol I now open internet explorer")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "iexplore http://www.Google.Com", 9
WScript.Sleep 10000 ' Give ie some time to load



8 comments:

Anonymous said...

Hi Ritesh

This was really cool....u solved my issues...thanks a lot, and cheers!!!

Parkour Pumpkin said...

Haha this is awesome dude, One thing i played around with on the 'make the computer talk' script, is instead of just strText = "your message here" ...I put strText=inputbox("Type your message here","Computer Talk","Type Here") ...so you can make it say what you like on demand ^^ *****

Parkour Pumpkin said...

HAHAHAHAA my antivirus program picks up on the "agent Prank" script and moves it to the vault =P

Anonymous said...

i dont know why i had to go to 30 plus website pages and countless hours to find what i was looking for . and it was right hear on a prank page . not one of the other websites wrte it out for you and said to save as .VBS great help thank you!!!!!!!!!!!!

Anonymous said...

awesome

saha said...

Awesome bro!!!

Anonymous said...

2nd part came up as fault when i used copy and paste

Wscript.Sleep 100
On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs"
Set objAgent2 = CreateObject("Agent.Control.2")
ObjAgent2.Connected = TRUE
ObjAgent2.Characters.Load strAgentName2, strAgentPath2
Set objPeter = objAgent2.Characters.Character(strAgentName2)
ObjPeter.MoveTo 700,300
ObjPeter.Show
ObjPeter.Play "GetAttention"
ObjPeter.Play "GetAttentionReturn"
ObjPeter.Speak("lol I now open internet explorer
")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "iexplore http://www.Google.Com", 9
WScript.Sleep 10000 ' Give ie some time to load

this line ObjPeter.Speak("lol I now open internet explorer
")

for some reason has put a space in after internet explorer delete the space and works fine

just incase anyone cant get this to work

Arun Raj said...

Hey Cool Tricks!!!!

Post a Comment

About Author

My photo
Working as an Automation Analyst, Ritesh is very passionate about developing tools and apps. His profile contains a long list of tools developed for Windows and apps for Android platform.