VBScript

While WSH is language-independent, in this chapter we use Visual Basic Script (VBScript) for demonstrating its capabilities. This section provides a basic introduction to VBScript programming.

The concepts explained in this section, especially those related to the creation and manipulation of objects, apply to all scripting languages implemented in WSH. Even if you have worked with other languages such as Perl but have limited exposure to the concept of objects, you should read through it.

Scripting languages such as VBScript are interpreted. That is, the commands in a script are translated into a low-level computer language and executed at the same time. This differs from standard applications (.exe files), which are compiled by the designers long before being executed. Although interpreted scripts are inherently slower than compiled applications, interpretations provide the advantage of not requiring a compiler or any type of specialized authoring environment.

A script is composed of a number of elements. Variables are created to temporarily store values and object information. Commands, known as functions or methods, are executed to perform various predefined operations. Complex routines are built up with the aid of programming statements (such as conditional statements that are used to determine if a certain operation is to be executed based on a condition), and loops (which allow operations to be repeated a set number of times).

Comments

It is important to add comments ...

Get Windows XP in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.