What Is VBScript?
This section provides a quick introduction of VBScript as scripting language for Windows systems. VBScript allows you to write script code to be executed in many host environments such as Internet Explorer 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 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 code for other Windows applications like Microsoft Access.
VBScript version history:
2009, VBScript 5.8
2007, VBScript 5.7
2002, VBScript 5.6
1999, VBScript 5.0
1998, VBScript 4.0
1998, VBScript 3.0
1997, VBScript 2.0
1996, VBScript 1.0
As you can see from the version history, VBScript is reaching its end of life now.
Microsoft has announced that VBScript is no longer supported in the IE replacement browser, Edge.
But you can still use VBScript in older browsers and older Windows systems.
Table of Contents
About This Book
►Introduction of VBScript - Visual Basic Scripting Edition
►What Is VBScript?
Using VBScript with Internet Explorer 10 or Older
Using VBScript with Internet Explorer 11
Using VBScript with Internet Information Services
Using VBScript with WSH (Windows Script Host)
Using Visual Basic with Microsoft Access
VBScript and Supporting Environments
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)
Full Version in PDF/EPUB