Skip to:Content
|
Bottom
Cover image for VBScript programmer's reference
Title:
VBScript programmer's reference
Personal Author:
Series:
Programmer to programmer
Edition:
2nd ed.
Publication Information:
Indianapolis, Ind. : Wiley Publishing, Inc. , 2004
ISBN:
9780764559938

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010059006 QA76.73.V27 K56 2004 Open Access Book Book
Searching...

On Order

Summary

Summary

What is this book about?

The VBScript standard has changed over time, and several new things have been introduced since this book first published in 1999. The current standard for VBScript is 5.6. The script debugger, script control, and script encoder have all changed and the Windows Script Component Wizard, regular expressions, and remote scripting have been introduced. Windows Script Host technology has also matured over time and gained in both effectiveness and popularity.

VBScript Programmer's Reference, 2nd Edition begins with discussion of the general syntax, functions, keywords, style, error handling, and similar language-specific topics and then moves into an expanded reference section covering the object models in detail. The book combines a comprehensive overview of the VBScript technology and associated technologies with practical examples at every stage from beginner to advanced user.

Specific topics include the following:

Variables and Data Types Procedures Error Handling and Debugging Windows Script Components Script Encoding Remote Scripting Data Objects Coding Conventions


Author Notes

Adrian Kingsley-Hughes has made his living as a technology writer for the last six years, with many books and articles to his name. He can also be found teaching classes on the Web, where he has successfully taught technology skills to thousands of learners, with his own special brand of knowledge, experience, wit, and poor spelling.

Kathie Kingsley-Hughes has worked in IT training for many years. In addition to writing, she now works as a courseware developer and e-trainer, specializing in Internet technologies. She also runs a Web development company in the United Kingdom.

Daniel Reed is a software developer living and working in Atlanta, GA, USA. He currently works for Connecticut Inc., an Atlanta-based software consulting firm specializing in the insurance industry. Daniel also publishes and writes essays for chapters.*, a Web-based magazine for software professionals (DeveloperDotStar.com).


Table of Contents

About the Authorsp. vii
Acknowledgmentsp. xi
Introductionp. xxv
Chapter 1 A Quick Introduction to Programmingp. 1
Overviewp. 1
Variables and Data Typesp. 2
Flow Controlp. 8
Operatorsp. 17
Organizing and Reusing Codep. 19
Top-Down versus Event-Drivenp. 23
Coding Guidelinesp. 24
Summaryp. 28
Chapter 2 What VBScript Is--and Isn't!p. 29
Overviewp. 29
Windows Scriptp. 29
Version Informationp. 30
VBScript Is a Subset of VBp. 30
VBScript Is a Scripting Languagep. 30
VBScript Is Interpreted at Runtimep. 31
Advantages of Using VBScriptp. 34
Is VBScript Right for You?p. 35
How VBScript Fits In with the Visual Basic Familyp. 35
What Can You Do with VBScript?p. 37
Tool of the Trade--Tools for VBScriptp. 40
Summaryp. 41
Chapter 3 Data Typesp. 43
Overviewp. 43
Scripting Languages as Loosely Typedp. 43
Why Data Types Are Importantp. 44
The Variant: VBScript's Only Data Typep. 46
Arrays as Complex Data Typesp. 68
Summaryp. 77
Chapter 4 Variables and Proceduresp. 79
Overviewp. 79
Option Explicitp. 79
Naming Variablesp. 81
Procedures and Functionsp. 82
Variable Declaration and Scopep. 90
Variable Lifetimep. 92
Design Strategies for Scripts and Proceduresp. 93
ByRef and ByValp. 96
Literals and Named Constantsp. 98
Summaryp. 103
Chapter 5 Control of Flowp. 105
Branching Constructsp. 105
Loop Constructsp. 110
Summaryp. 124
Chapter 6 Error Handling and Debuggingp. 125
Overviewp. 125
Types of Errorsp. 126
Error Visibility and Contextp. 132
Handling Errorsp. 134
Generating Custom Errorsp. 143
Debuggingp. 148
Summaryp. 171
Chapter 7 The Scripting Runtime Objectsp. 173
Overviewp. 173
What Are Runtime Objects?p. 173
The Built-In Objects: Debug, Err, and RegExpp. 174
Creating Objectsp. 174
Properties and Methodsp. 175
The "With" Keywordp. 175
Objects Can Have Multiple Referencesp. 176
Object Lifetime and Destroying Objectsp. 178
The Dictionary Objectp. 179
The FileSystemObject Libraryp. 186
Summaryp. 197
Chapter 8 Classes in VBScript (Writing Your Own COM Objects)p. 199
Overviewp. 199
Objects, Classes, and Componentsp. 199
The Class Statementp. 201
Defining Propertiesp. 202
Defining Methodsp. 208
Class Eventsp. 210
Class-Level Constantsp. 212
Class-Level Arraysp. 213
Building and Using a Sample VBScript Classp. 214
Summaryp. 222
Chapter 9 Regular Expressionsp. 223
Overviewp. 223
Introduction to Regular Expressionsp. 223
Regular Expressions in Actionp. 223
The RegExp Objectp. 228
A Few Examplesp. 244
Summaryp. 247
Chapter 10 Client-Side Web Scriptingp. 249
Overviewp. 249
Tools Of The Tradep. 249
How Browser Scripting Worksp. 250
Different Scripting Languagesp. 251
Responding to Browser Eventsp. 254
The Document Object Modelp. 269
Summaryp. 275
Chapter 11 Super-Charged Client-Side Scriptingp. 277
Overviewp. 277
Requirementsp. 277
Browser Securityp. 278
Scriptlets--Ancestors of Behaviorsp. 278
Event Managementp. 286
Scriptlets Are Deprecated in IE5p. 292
HTML Components (HTCs)p. 294
Summaryp. 304
Chapter 12 Windows Script Hostp. 307
Overviewp. 307
Tools of the Tradep. 308
What Is WSH?p. 308
Types of Script Filesp. 309
Running Scripts with the Windows Script Hostp. 310
Using .WSH Files to Launch Scriptsp. 312
Windows Script Host Intrinsic Objectsp. 313
Summaryp. 361
Chapter 13 Windows Script Componentsp. 363
Overviewp. 363
What Are Windows Script Components?p. 363
What Tools Do You Need?p. 364
The Script Component Runtimep. 364
Script Component Filesp. 365
Exposing Properties, Methods, and Eventsp. 374
Registration Informationp. 378
Creating the Script Component Type Librariesp. 380
Script Components for ASPp. 382
Compile-Time Error Checkingp. 384
Using VBScript Classes in Script Componentsp. 385
Summaryp. 388
Chapter 14 Script Encodingp. 389
Overviewp. 389
Limitations of Script Encodingp. 389
Why Encode Scripts?p. 390
How to Encode Scriptp. 390
Encoded Scripts-Do's and Don'tsp. 404
Decoding the Scriptp. 405
Other Methods of Script Obfuscationp. 405
Summaryp. 406
Chapter 15 Remote Scriptingp. 407
Overviewp. 407
The Influence of JScript on Remote Scriptingp. 407
How Remote Scripting Worksp. 408
Using VBScript for Remote Scriptingp. 408
Invoking a Remote Methodp. 410
Summaryp. 414
Chapter 16 HTML Applicationsp. 415
What is an HTML Application?p. 415
What Tools Do You Need?p. 416
How to Create a Basic HTAp. 416
The HTA: Application Elementp. 420
HTAs and Securityp. 428
HTA Deployment Modelsp. 432
What Isn't Supported with HTAs?p. 433
Summaryp. 434
Chapter 17 Server-Side Web Scriptingp. 435
Overviewp. 435
The Anatomy of the HTTP Protocolp. 436
Introducing Active Server Pagesp. 441
The Active Server Pages Object Modelp. 444
Using Active Server Pages Effectivelyp. 460
Summaryp. 468
Chapter 18 Adding VBScript to Your VB Applicationsp. 469
Overviewp. 469
Why Add Scripting to Your Application?p. 469
Macro and Scripting Conceptsp. 470
Adding the Script Control to a VB Applicationp. 471
Script Control Referencep. 472
Error Handling with the Script Controlp. 488
Debuggingp. 491
Using Encoded Scriptsp. 491
Sample Projectp. 492
Summaryp. 497
Appendix A VBScript Functions and Keywordsp. 499
Appendix B Variable Naming Conventionp. 569
Appendix C Coding Conventionp. 571
Appendix D Visual Basic Constants Supported in VBScriptp. 575
Appendix E VBScript Error Codes and the Err Objectp. 581
Appendix F The Scripting Runtime Library Object Referencep. 597
Appendix G The Windows Script Host Object Modelp. 609
Appendix H Regular Expressionsp. 619
Appendix I VBScript Features not in VBAp. 623
Appendix J VBA Features not in VBScriptp. 625
Appendix K The Variant Subtypesp. 627
Appendix L ActiveX Data Objectsp. 631
Indexp. 657
Go to:Top of Page