VBS Scripts

Introduction: VBS Scripts

Hello again!

I decided to share with you more notepad tricks.....

The first one will show you how old you're going to be after 39 years.
And the second - in which year you're going to be 50.

I hope you like them:)

here are the results:)))

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Trick Number 1

This trick will show you how old you'll be in 39 years.

1. Open notepad
2. Type this code:

WScript.Echo "Hello!"

Set WshShell = WScript.CreateObject("WScript.Shell")
age = InputBox("Please type your age.")

newage = age + 39
WshShell.Popup "In 39 years, you will be " & newage & "."

3. Go to File - save as and save it like this age ( or something else). vbs
It doesn't matter what will be the name, but it have to end with .vbs

4. That's it!!!

NOTE: You can change 39 with other number if you want. But don't forget to change it in both places!!!

Step 2: Trick Number 2

This trick will show you in which year you'll be 50. You have to type only your birth year.

1. Open notepad
2. Type this code:

WScript.Echo "Hello!"

Set WshShell = WScript.CreateObject("WScript.Shell")
birthdate = InputBox("Please type your birth year only.")

newage = birthdate + 50
WshShell.Popup "In " & newage & " you'll be 50."

3. Go to File - save as and save it years. vbs
Like I said before it doesn't matter the name, but it must end with .vbs

Step 3: The End

This codes will not harm your computer:)

Enjoy and good luck!!!

First Prize in the
April Fools' Speed Contest

Be the First to Share

    Recommendations

    • Toys and Games Challenge

      Toys and Games Challenge
    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge

    21 Discussions

    0
    PaperAirplanz
    PaperAirplanz

    3 years ago

    DO

    msgbox " Please do not close this window. "

    LOOP

    0
    bretjazs
    bretjazs

    8 years ago on Introduction

    will you teach me ..!
    manually?
    i want to learn about notepad..!

    0
    kaseyhare
    kaseyhare

    10 years ago on Step 1

    i dont understand 

    0
    slu6alka
    slu6alka

    Reply 10 years ago on Step 1

    What exactly you don't understand?

    0
    geeklord
    geeklord

    11 years ago on Introduction

    mmmkay,I read a couple tutorials on VBS and i decided to try to write something of my own. I'm having problems. It says the "Next" at the end is unexpected. I have the For at the begining, so why is this happening?


    For a=1 to 3
    dim b
    b=1
    if b=1 then
    msgbox"Hi"
    if b=2 then
    msgbox"How are you?"
    if b=3 then
    msgbox"That's great"
    b=b+1
    next

    0
    munchman
    munchman

    Reply 11 years ago on Introduction

    what are you truing to accomplish with the 'next'?

    0
    ahmedvadia
    ahmedvadia

    11 years ago on Introduction

    could you embed one in the spider solitaire so it shows an error and exits spider solitaire

    0
    TATcreator
    TATcreator

    Reply 11 years ago on Introduction

    Hello, old friend. How is your line of work coming?

    0
    CelloMan
    CelloMan

    12 years ago on Introduction

    these aren't really jokes but i guess if you want a chance at winning the random prize...

    0
    Cerafem
    Cerafem

    Reply 12 years ago on Introduction

    "I decided to share with you more notepad tricks....." You are the only person to say that they were jokes. Try to read more carefully.

    0
    CelloMan
    CelloMan

    Reply 12 years ago on Introduction

    i said, if you paid more attention ===="these aren't really jokes"====
    therefore meaning you shouldnt have entered them in the april fools day contest

    0
    Dr.Paj
    Dr.Paj

    Reply 12 years ago on Introduction

    That is exactly what happened. Nice call.

    0
    Transquesta
    Transquesta

    12 years ago on Introduction

    For anyone who cares/is interested, you can convert your .vbs 'creations' into .exe by going here and getting a copy of VbsToExe: http://www.f2ko.de/English/v2e/index.php

    Sorry, I've only been able to find the CMD utility, but the syntax is pretty straight-forward.

    0
    Flea
    Flea

    12 years ago on Introduction

    These aren't notepad tricks. It's Windows Scripting (VBScript). You can do this in any text editor. You should change the title to something referring to VBScript