Abels Archives
TX
United States
abel
Vbscript is a lot similar to visual basic .Net. After a series of tests I have conducted, I managed to program some similar real programs on to my computer. But as a start, one must know the basics of programming before advancing further into it.
HTML uses vbscript making it easy to execute stuff.
In VB .Net, we are use to using parenthesis yes? Well, when I conducted tests with vbscript I had to take out the parenthesis when solo-executing functions or sub procedures are executed.
This execution method shows me using parenthesis. intX = Msgbox("Are you going to eat today?",4,"Asking")
This execution method shows me not using parenthesis.
msgbox "Hello everyone.",64,""
Note: Only solo-executed functions are not to have parenthesis.
option explicit is used to indicate your terms or variables to be "exact." Means that when you execute a variable or a function, you must execute it with case sensitivity.
Option Explicit - available in vbscript.
Dim strExample
strExample = "Happy Thanks Giving"
msgbox strExample,64,"Greetings"
Both Javascript and VBscript can execute command prompt codes using WScript.
Class
I think of class codes as an object. A class can be like a story. Each function inside it is a character that plays an important role in the story. I am sure you familiar with certain objects such as WScript, FileSystemObject, Dictionary, etc...
These objects have sub-procedures. It is the same thing with a class. Each class has sub procedures in them. For example, GetFile is a sub procedure to FileSystemObject. It carries parameters like a function does.
Private and public allows access from and to the object's functions/sub procedures..
Class Sampling
PRIVATE mstrFirst
PRIVATE Sub Class_Initialize()
'codes/procedures initialization
END SUB
PUBLIC FUNCTION InserFirstName(BYVAL str1)
'put in str1 into mstrFirst
mstrFirst = str1
END PUBLIC
PRIVATE SUB CLASS_TERMIANTE()
'code/'procedures terminator
END SUB
END CLASS
Microsoft would also be the best reference for vbscript.
Search for "vbscript features" in the search box.
Copyright 2009 Abel's Archives. All rights reserved.
Website Updated on September 17,2010
Note: This site is about AbelsArchives.com Works.
Abels Archives
TX
United States
abel