Introduction: How To: Make a Message Box Using VBScript
In this "Instructable" I'll be showing you how to make a message box in Notepad using VBScript Coding.
Please Note: This is a completely harmless project and if something DOES go wrong, I will not be help responsible.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Step One
First thing to do is locate your Notepad.exe.
This application is on every windows computer OS and can be used for loads of interesting things.
Notepad.exe is normally located in Start Menu>All programs>Accessories
Step 2: Step Two: the Code.
x=msgbox("Your Text Here" ,0, "Your Title Here")
Make sure that the " is included in the text and replace the Your Text Here and Your Title Here. But don't change anything elese!
Advanced users can change something else.
- 0 =OK button only
- 1 =OK and Cancel buttons
- 2 =Abort, Retry, and Ignore buttons
- 3 =Yes, No, and Cancel buttons
- 4 =Yes and No buttons
- 5 =Retry and Cancel buttons
- 16 =Critical Message icon
- 32 =Warning Query icon
- 48 = Warning Message icon
- 64 =Information Message icon
- 0 = First button is default
- 256 =Second button is default
- 512 =Third button is default
- 768 =Fourth button is default
- 0 =Application modal (the current application will not work until the user responds to the message box)
- 4096 =System modal (all applications wont work until the user responds to the message box)
Step 3: Step Three: the Saving
Now for this bit, you would think that this is easy, but it's not as simple as Save As.
When you have finished the code, go to Save As and save it as: What You Want To Call It.vbs
At the end of the name, make sure that .vbs goes at the end and safe it anywhere.
Step 4: Step Four: Lets Test It!
Now that we have completed the following steps, lets test it. Locate your safe file and dubble-click it. Lets see what the outcome was.
Step 5: Outcome.
The outcome of todays lesson was:
Your learned how Notepad.exe can become a powerfull scripting program
How to make a message Box
The values of Message Box's to make them look convincing.
Thank you for reading this lesson