O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Foreword

The evolution of VBScript has been an interesting and somewhat unpredictable ride for everyone involved, from the product team here at Microsoft to, more importantly, the VBScript scripting community. We started VBScript back in 1994 as a lightweight scripting language that could be integrated into a set of technologies then known as Sweeper, which eventually saw the light of day as Internet Explorer 3. The intent was to provide a small, fast, and safe subset of Visual Basic that would allow for scripting of HTML and ActiveX Controls (actually they were still OLE Controls back then) in HTML pages. Since this seemed like a pretty simple task, a couple of developers set out on a Friday evening to implement it over a weekend, and sure enough, on Monday there was a working version of the language, albeit a very small subset of the language. We spent the next six months polishing the rough edges, resulting in the release of VBScript 1.0 with Internet Explorer 3.0. VBScript then was a pretty good language, including many of the features of VB—many more than were first imagined in that first weekend.

The plan for VBScript was always to let the language grow to make it usable to develop not just client-side web browser code, but also to script server-side pages. VBScript 2.0 was shipped with the first release of Active Server Pages just eight months after the release of Version 1.0—ah, the halcyon days of Internet time. Active Server Pages proved to be wildly successful, and VBScript usage and interest skyrocketed. The next big step for VBScript was the introduction of Windows Script Host, which added administrative capabilities to the VBScripter’s toolkit. This proved to be very successful, since it finally provided a modern alternative to batch files that could take advantage of the rich COM components available in Windows.

The success of VBScript led to requests to expand the language to meet the expanded expectations of VBScript programmers. Some of the key design tenets for VBScript were to keep it small, simple to understand, flexible to grow with the programmer, and, most of all, fun to use. The last releases of VBScript Versions 5, 5.5 and 5.6 saw major additions to the language, including the long sought after with block, classes, function references for better Internet Explorer integration, and regular expressions. VBScript is now a much more capable and powerful language than we ever imagined it would be, and having a reference guide to all the language features becomes even more important. VBScript in a Nutshell is a great reference to the language, and I hope it makes your scripting even more enjoyable and productive.

Script Happens.

—Andrew Clinick

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required