VBScript Basics

<< Click to Display Table of Contents >>

Navigation:  Reference (Scripting) >

VBScript Basics

If you already know Visual Basic® or Visual Basic® for Applications (VBA), VBScript will be very familiar. Have a look at the definitions and examples listed below. For getting started, try some of the following examples by copying & pasting the code into the script editor window and running the script. Docklight Scripting also comes with a number of sample scripts for you to try out.

 

This chapter introduces some basic VBScript functions and features. For a complete reference, please see the original documentation from Microsoft® at the following locations:

Visual Basic Scripting Edition (or go to www.microsoft.com and search for "VBScript")

VBScript User's Guide

VBScript Language Reference.

 

TIP: Use the ScriptEngine function to find out which version of VBScript is installed on your computer.

 

NOTE: Docklight Scripting executes the VBScript code in "safe mode" (safe subset) and disallows potentially harmful actions. For example, creating a "FileSystemObject" (file I/O) is one of the actions disallowed in the VBScript safe subset.  The Docklight script will abort with an error message. Please contact our e-mail support if you have special requirements and need to use "unsafe" VBScript statements. By popular request, file I/O is now easily possible using Docklight's FileInput / FileOutput objects.

 

Docklight-Specific Features

 

Docklight Script Commands - The DL Object

Docklight OnSend / OnReceive event procedures

Docklight FileInput / FileOutput Object for Reading and Writing Files

 

VBScript Basic Features by Categories

 

Control Structures (Decision Structures, Loop Structures)

Variables, Arrays, Constants and Data Types

Operators

Date/Time Functions

Miscellaneous

 

VBScript Basic Features in Alphabetical Order

 

Date Function

Day Function

Do Until ...Loop

Do...Loop While

For...Next

Hour Function

If...Then

If...Then...Else

InputBox Function

LBound Function

Minute Function

Month Function

Now Function

ScriptEngine Function

Second Function

Select Case

Time Function

Timer Function

UBound Function

While...Wend

Year Function