Cool and Funny Vbs Scripts

vbscriptProgramming might be some times tedious job but there are ways to make it cool and funny.Here we presents some funny and interesting vbs scripts tips that’s shared across the web.However readers might be familiar with these tricks, but these simple lines may seem like magic to newbies.Vb script files are old  executable scripts(Visual Basic Scripting, an Active Scripting language developed by Microsoft that is modeled on Visual Basic) with .vbs extension. Such files can be made by using simple text editor i.e. Notepad on windows.This scripting has got an awesome extend even virus can be created for exploitation on Windows.However below scripts we discuss are mere funny scripts, the trick that you can play without having any danger at all.

1 . Open Notepad.
2. Copy or type  any of these codes written below :

3. SAVE the file as filename.vbs (choose save as type as “all files” )

4.To stop any of these script goto->taskmanager ->process->wscript.exe and End it

  • Trick to make your computer speak as you type

Dim message, sapi
message=InputBox(“If you type any thing in the box below I will read it aloud “,”techtimely”)
Set sapi=CreateObject(“sapi.spvoice”)
sapi.Speak message

  • Make Caps Lock go on and off repeating!

Set wshShell =wscript.CreateObject(“WScript.Shell”)
do
wscript.sleep 100
wshshell.sendkeys “{CAPSLOCK}”
loop

  • Continually pop out your CD Drive

set wmp = createObject(“wmplayer.ocx.7″)
set drives = wmp.cdromCollection

sub open_saysame()
on error resume next
do
if drives.count>= 1 then
for i = 0 to drives.count – 1
drives.item(i).eject()
next
end if
loop
end sub
open_saysame()

  • Automatically opens notepad and type some thing

WScript.Sleep 180
WScript.Sleep 100
Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.Run “notepad”
WScript.Sleep 100
WshShell.AppActivate “Notepad”
WScript.Sleep 500
WshShell.SendKeys “Hel”
WScript.Sleep 500
WshShell.SendKeys “lo “
WScript.Sleep 500
WshShell.SendKeys “, ho”
WScript.Sleep 500
WshShell.SendKeys “w a”
WScript.Sleep 500
WshShell.SendKeys “re “
WScript.Sleep 500
WshShell.SendKeys “you”
WScript.Sleep 500
WshShell.SendKeys “? “
WScript.Sleep 500
WshShell.SendKeys “I a”
WScript.Sleep 500
WshShell.SendKeys “m g”
WScript.Sleep 500
WshShell.SendKeys “ood”
WScript.Sleep 500
WshShell.SendKeys “you”
WScript.Sleep 500
WshShell.SendKeys “r sy”
WScript.Sleep 500
WshShell.SendKeys “stem”
WScript.Sleep 500
WshShell.SendKeys “hac”
WScript.Sleep 500
WshShell.SendKeys “ked”
WScript.Sleep 500
WshShell.SendKeys ” Ajeet”
WScript.Sleep 500
WshShell.SendKeys “Rock”
WScript.Sleep 500
WshShell.SendKeys “s! “

Note:To stop the script or the activity running due to script. you need to kill wscript.exe process from the task manager(to stop, open task manager, hit on “Processes” tab, right-click on wscript.exe from the processes list and select end process.).There is an alternative and easy way to stop running the script without opening task manager. To do this way.
Click Start button —  run —  taskkill /f /im wsript.exe — hit enter. You are done..

If any error message pops out check the line no and character and adjust it.Commonly some times it occurs due to this symbol  “(Quotation mark) .Replace all with your keyboard.Some times your antivirus pops out with malware symbol.Note  that it happens but infact these are not viruses or malware since we can stop process by using taskmanager.

  • Make computers internal speaker beep that doesn’t stop

do
Set oWS = WScript.CreateObject(“WScript.Shell”)
oWS.Run “%comspec% /c echo ” & Chr(07), 0, True
loop

You can also beep by simple cmd trick

open command prompt
press ctrl+g (press it around 5 times)
press enter and your computer should emit an alarm sound.

 

About these ads

About Technology Timely

Aimed on updated tech news

Posted on March 15, 2011, in Tips'n'Tricks, Windows. Bookmark the permalink. 8 Comments.

  1. alrdy know some of thse tricks.thanks for sharing

  2. really funny tricks

  3. Shows ERROR

    Line: 1
    Char: 36
    Code: 800A0408
    Source : Microsoft VBScript compilation error

    • Please specify on which script[from above ], mostly error might be in case of symbols like [ ” “] replace with this by manually typing .mean while this is a shared scripts & is old , so most had success in trying it.

  4. Nice scripts…

  5. how to print a variable in notepad

    • Since you commented under “Cool and Funny Vbs Scripts” probably you expected a .vbs script, right? , seems to be a simple question , but it can have different variations, among 2 are ,
      for eg: 1. a script to default open up an notepad and print a variable assigned value.
      2. simply pop up a window displaying a variable , for 2nd case it’s much simple using an echo command (save both script as any filename.vbs and run)
      public const L_val = "ip"
      WScript.Echo L_val

      For first case
      public const L_val = "ip"
      Set WshShell = WScript.CreateObject("WScript.Shell")
      WshShell.Run "notepad"
      WScript.Sleep 500
      WshShell.SendKeys L_val

      Both are simple scripts, if you are more interested (considering the quest asked) , best resource/way is to analyze the buitlin scripts of Windows Os itself , just search for .vbs files .

  1. Pingback: Windows OS Customizing Tips « TechNews Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: