What Is VBScript?
This section provides a quick introduction of VBScript as scripting language for Windows systems. VBScript allows you to write script codes to be executed in many host environments such as Internet Expleror and Internet Information Services for Web page scripting.
VBScript - VBScript (Visual Basic Scripting Edition) is a scripting language developed by Microsoft
for Windows operating systems.
A VBScript code must be executed within a host environment.
It allows you to interact with the host environment to perform some programming tasks.
A host environment will usually:
- Provide you a specific way to enter your VBScript source code.
- Provide you some basic objects defined in the VBScript core specification.
- Provide you some specific objects to let your code to interact with the host application.
- Provide you additional objects to let your code to access certain operating system resources.
Examples of VBScript host environments
- Internet Explorer (IE) - Allows you to include VBScript code in HTML documents to be executed
while IE is rendering HTML documents on the screen. This is also called client side scripting.
- Internet Information Services (IIS) - Allows you to include VBScript code in HTML documents
to be executed while IIS is fetching HTML documents on the Web server to deliver to client machines.
This is also called server side scripting.
- Windows Script Host (WSH) - Allows you to include VBScript code in script files to be executed
directly on the Windows operating system.
VBScript version history:
1996 VBScript 1.0
1997 VBScript 2.0 - Renamed to 5.0 later
2002 VBScript 5.6
2007 VBScript 5.7
VBScript is actually is a limited variation of Microsoft's Visual Basic programming language.
Therefore VBScript shares the same language syntax as Visual Basic.
Visual Basic can be used to develop standalone Windows applications.
Visual Basic can also be used to write macro codes for other Windows applications like Microsoft Access.
Table of Contents
About This Book
►Introduction of VBScript - Visual Basic Scripting Edition
►What Is VBScript?
Using VBScript with Internet Explorer
Using VBScript with Internet Information Services
Using VBScript with Windows Script Host
Using Visual Basic with Microsoft Access
Variant Data Type, Subtypes, and Literals
Numeric Comparison Operations and Logical Operations
String Operations - Concatenation and Comparison
Variable Declaration and Assignment Statement
Expression and Order of Operation Precedence
Statement Syntax and Statement Types
Array Data Type and Related Statements
Array References and Array Assignment Statements
Conditional Statements - "If ... Then" and "Select Case"
Loop Statements - "For", "While", and "Do"
"Function" and "Sub" Procedures
Inspecting Variables Received in Procedures
Error Handling Flag and the "Err" Object
Regular Expression Pattern Match and Replacement
scrrun.dll - Scripting Runtime DLL Library
Creating Your Own Classes
IE Web Browser Supporting VBScript
IIS ASP Server Supporting VBScript
WSH (Windows Script Host)
PDF Printing Version