Hey there everyone. So, I decided to start a series on VBS programming language. First the question is - "What is VBS?"
VBScript (Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It is designed as a “lightweight” language with a fast interpreter for use in a wide variety of Microsoft environments. VBScript uses the Component Object Model to access elements of the environment within which it is running; for example, the FileSystemObject (FSO) is used to create, read, update and delete files.
So, that's VBS. If you want know more about it click here.
So, today I will show you how you can make a basic pop up box in VBS language. You will only a computer and Notepad.
First of all open up notepad and type this-
x=msgbox("Your Message ",buttons,"cool")
On the place where it is written Your Message you can edit it to anything you want and also for the title
you can edit that cool portion. Now you probably noticed that what the hell is the buttons. It shows different types of buttons on the pop up.
For the above picture here is the code.
x=msgbox("Hello everyone!!!",0,"cool")
Also here is few buttons and the numbers so you can experiment with it.
0: Normal message box
1: OK and Cancel
2: Abort, Retry, Ignore
3: Yes, No, Cancel
4: Yes and No
5: Retry and Cancel
16: Critical message icon
32: Warning query icon
48: Warning message icon
64: Information message icon
4096: Always stay on top of the desktop
Now the most important part -"How to save it?"
It is pretty basic but the most important part. So once you have finished writing in the notepad.
Go ahead and click on File > Save and save dialogue box will appear. Here you can give any name but followed by .vbs
And in the save as type it should be "All Files"
Here is an example below -
Also if you want to add more than two features like critical message icon and Yes, No and Cancel you can use the plus (+) sign. For example-
x=msgbox("Hello everyone!!!",4+16,"cool")
The output will be like this -
So hope you have enjoyed the very first tutorial on vbs programming.
Make sure to check again for more tutorials like this.
My website -http://www.aacproduction.co.cc
You Tube channel - http://www.youtube.com/allismagic1
AAC Production - All About Computers


