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 ConventionsAuthor 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 Authors | p. vii |
Acknowledgments | p. xi |
Introduction | p. xxv |
Chapter 1 A Quick Introduction to Programming | p. 1 |
Overview | p. 1 |
Variables and Data Types | p. 2 |
Flow Control | p. 8 |
Operators | p. 17 |
Organizing and Reusing Code | p. 19 |
Top-Down versus Event-Driven | p. 23 |
Coding Guidelines | p. 24 |
Summary | p. 28 |
Chapter 2 What VBScript Is--and Isn't! | p. 29 |
Overview | p. 29 |
Windows Script | p. 29 |
Version Information | p. 30 |
VBScript Is a Subset of VB | p. 30 |
VBScript Is a Scripting Language | p. 30 |
VBScript Is Interpreted at Runtime | p. 31 |
Advantages of Using VBScript | p. 34 |
Is VBScript Right for You? | p. 35 |
How VBScript Fits In with the Visual Basic Family | p. 35 |
What Can You Do with VBScript? | p. 37 |
Tool of the Trade--Tools for VBScript | p. 40 |
Summary | p. 41 |
Chapter 3 Data Types | p. 43 |
Overview | p. 43 |
Scripting Languages as Loosely Typed | p. 43 |
Why Data Types Are Important | p. 44 |
The Variant: VBScript's Only Data Type | p. 46 |
Arrays as Complex Data Types | p. 68 |
Summary | p. 77 |
Chapter 4 Variables and Procedures | p. 79 |
Overview | p. 79 |
Option Explicit | p. 79 |
Naming Variables | p. 81 |
Procedures and Functions | p. 82 |
Variable Declaration and Scope | p. 90 |
Variable Lifetime | p. 92 |
Design Strategies for Scripts and Procedures | p. 93 |
ByRef and ByVal | p. 96 |
Literals and Named Constants | p. 98 |
Summary | p. 103 |
Chapter 5 Control of Flow | p. 105 |
Branching Constructs | p. 105 |
Loop Constructs | p. 110 |
Summary | p. 124 |
Chapter 6 Error Handling and Debugging | p. 125 |
Overview | p. 125 |
Types of Errors | p. 126 |
Error Visibility and Context | p. 132 |
Handling Errors | p. 134 |
Generating Custom Errors | p. 143 |
Debugging | p. 148 |
Summary | p. 171 |
Chapter 7 The Scripting Runtime Objects | p. 173 |
Overview | p. 173 |
What Are Runtime Objects? | p. 173 |
The Built-In Objects: Debug, Err, and RegExp | p. 174 |
Creating Objects | p. 174 |
Properties and Methods | p. 175 |
The "With" Keyword | p. 175 |
Objects Can Have Multiple References | p. 176 |
Object Lifetime and Destroying Objects | p. 178 |
The Dictionary Object | p. 179 |
The FileSystemObject Library | p. 186 |
Summary | p. 197 |
Chapter 8 Classes in VBScript (Writing Your Own COM Objects) | p. 199 |
Overview | p. 199 |
Objects, Classes, and Components | p. 199 |
The Class Statement | p. 201 |
Defining Properties | p. 202 |
Defining Methods | p. 208 |
Class Events | p. 210 |
Class-Level Constants | p. 212 |
Class-Level Arrays | p. 213 |
Building and Using a Sample VBScript Class | p. 214 |
Summary | p. 222 |
Chapter 9 Regular Expressions | p. 223 |
Overview | p. 223 |
Introduction to Regular Expressions | p. 223 |
Regular Expressions in Action | p. 223 |
The RegExp Object | p. 228 |
A Few Examples | p. 244 |
Summary | p. 247 |
Chapter 10 Client-Side Web Scripting | p. 249 |
Overview | p. 249 |
Tools Of The Trade | p. 249 |
How Browser Scripting Works | p. 250 |
Different Scripting Languages | p. 251 |
Responding to Browser Events | p. 254 |
The Document Object Model | p. 269 |
Summary | p. 275 |
Chapter 11 Super-Charged Client-Side Scripting | p. 277 |
Overview | p. 277 |
Requirements | p. 277 |
Browser Security | p. 278 |
Scriptlets--Ancestors of Behaviors | p. 278 |
Event Management | p. 286 |
Scriptlets Are Deprecated in IE5 | p. 292 |
HTML Components (HTCs) | p. 294 |
Summary | p. 304 |
Chapter 12 Windows Script Host | p. 307 |
Overview | p. 307 |
Tools of the Trade | p. 308 |
What Is WSH? | p. 308 |
Types of Script Files | p. 309 |
Running Scripts with the Windows Script Host | p. 310 |
Using .WSH Files to Launch Scripts | p. 312 |
Windows Script Host Intrinsic Objects | p. 313 |
Summary | p. 361 |
Chapter 13 Windows Script Components | p. 363 |
Overview | p. 363 |
What Are Windows Script Components? | p. 363 |
What Tools Do You Need? | p. 364 |
The Script Component Runtime | p. 364 |
Script Component Files | p. 365 |
Exposing Properties, Methods, and Events | p. 374 |
Registration Information | p. 378 |
Creating the Script Component Type Libraries | p. 380 |
Script Components for ASP | p. 382 |
Compile-Time Error Checking | p. 384 |
Using VBScript Classes in Script Components | p. 385 |
Summary | p. 388 |
Chapter 14 Script Encoding | p. 389 |
Overview | p. 389 |
Limitations of Script Encoding | p. 389 |
Why Encode Scripts? | p. 390 |
How to Encode Script | p. 390 |
Encoded Scripts-Do's and Don'ts | p. 404 |
Decoding the Script | p. 405 |
Other Methods of Script Obfuscation | p. 405 |
Summary | p. 406 |
Chapter 15 Remote Scripting | p. 407 |
Overview | p. 407 |
The Influence of JScript on Remote Scripting | p. 407 |
How Remote Scripting Works | p. 408 |
Using VBScript for Remote Scripting | p. 408 |
Invoking a Remote Method | p. 410 |
Summary | p. 414 |
Chapter 16 HTML Applications | p. 415 |
What is an HTML Application? | p. 415 |
What Tools Do You Need? | p. 416 |
How to Create a Basic HTA | p. 416 |
The HTA: Application Element | p. 420 |
HTAs and Security | p. 428 |
HTA Deployment Models | p. 432 |
What Isn't Supported with HTAs? | p. 433 |
Summary | p. 434 |
Chapter 17 Server-Side Web Scripting | p. 435 |
Overview | p. 435 |
The Anatomy of the HTTP Protocol | p. 436 |
Introducing Active Server Pages | p. 441 |
The Active Server Pages Object Model | p. 444 |
Using Active Server Pages Effectively | p. 460 |
Summary | p. 468 |
Chapter 18 Adding VBScript to Your VB Applications | p. 469 |
Overview | p. 469 |
Why Add Scripting to Your Application? | p. 469 |
Macro and Scripting Concepts | p. 470 |
Adding the Script Control to a VB Application | p. 471 |
Script Control Reference | p. 472 |
Error Handling with the Script Control | p. 488 |
Debugging | p. 491 |
Using Encoded Scripts | p. 491 |
Sample Project | p. 492 |
Summary | p. 497 |
Appendix A VBScript Functions and Keywords | p. 499 |
Appendix B Variable Naming Convention | p. 569 |
Appendix C Coding Convention | p. 571 |
Appendix D Visual Basic Constants Supported in VBScript | p. 575 |
Appendix E VBScript Error Codes and the Err Object | p. 581 |
Appendix F The Scripting Runtime Library Object Reference | p. 597 |
Appendix G The Windows Script Host Object Model | p. 609 |
Appendix H Regular Expressions | p. 619 |
Appendix I VBScript Features not in VBA | p. 623 |
Appendix J VBA Features not in VBScript | p. 625 |
Appendix K The Variant Subtypes | p. 627 |
Appendix L ActiveX Data Objects | p. 631 |
Index | p. 657 |