BN.com Gift Guide

VBScript Programmer's Reference

( 3 )

Overview

This book will not only serve as a reference guide to the VBScript language and syntax, but will also demonstrate its usage in context with many practical examples. It is ideal for anyone who uses VBScript as a programming language. It is a desktop reference and quick guide for ASP programmers, IE programmers and Windows Script Host programmers.
Read More Show Less
... See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (16) from $1.99   
  • Used (16) from $1.99   
Close
Sort by
Page 1 of 2
Showing 1 – 9 of 16 (2 pages)
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$1.99
Seller since 2005

Feedback rating:

(4104)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

Good
first Good [ No Hassle 30 Day Returns ] [ Edition: first ] Publisher: Wrox Press Pub Date: 10/1/1999 Binding: Paperback Pages: 850.

Ships from: College Park, MD

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2009

Feedback rating:

(23955)

Condition: Acceptable
Our feedback rating says it all: Five star service and fast delivery! We have shipped four million items to happy customers, and have one MILLION unique items ready to ship today!

Ships from: Toledo, OH

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2005

Feedback rating:

(4104)

Condition: Good
first Good [ No Hassle 30 Day Returns ] [ Edition: first ] Publisher: Wrox Press Pub Date: 10/1/1999 Binding: Paperback Pages: 850.

Ships from: College Park, MD

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2014

Feedback rating:

(1824)

Condition: Acceptable
Reading copy. May have notes, underlining or highlighting. Dust jacket may be missing.

Ships from: Hillsboro, OR

Usually ships in 1-2 business days

  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2008

Feedback rating:

(16222)

Condition: Very Good
Wrox Press, 10/01/1999, Paperback, Very Good condition.

Ships from: Frederick, MD

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2009

Feedback rating:

(11073)

Condition: Good
Book shows minor use. Cover and Binding have minimal wear and the pages have only minimal creases. A tradition of southern quality and service. All books guaranteed at the Atlanta ... Book Company. Our mailers are 100% recyclable. Read more Show Less

Ships from: Atlanta, GA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$1.99
Seller since 2014

Feedback rating:

(99)

Condition: Acceptable
1999 Paperback Fair

Ships from: Blue Springs, MO

Usually ships in 1-2 business days

  • Canadian
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$2.39
Seller since 2009

Feedback rating:

(3714)

Condition: Good
01/10/1999 Paperback Used-Good Book in good or better condition. Dispatched same day from US or UK warehouse.

Ships from: Valley Cottage, NY

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$12.62
Seller since 2014

Feedback rating:

(4)

Condition: Good
1999-10-01 Paperback Good Expedited shipping is available for this item!

Ships from: Burbank, CA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 2
Showing 1 – 9 of 16 (2 pages)
Close
Sort by
Sending request ...

Overview

This book will not only serve as a reference guide to the VBScript language and syntax, but will also demonstrate its usage in context with many practical examples. It is ideal for anyone who uses VBScript as a programming language. It is a desktop reference and quick guide for ASP programmers, IE programmers and Windows Script Host programmers.
Read More Show Less

Product Details

  • ISBN-13: 9781861002716
  • Publisher: Wrox Press, Inc.
  • Publication date: 10/1/1999
  • Series: Programmer's Reference Ser.
  • Pages: 807
  • Product dimensions: 6.10 (w) x 8.98 (h) x 1.74 (d)

Meet the Author


Daniel Read is Senior Developer at Compass, Inc. in Atlanta, GA, where he and fellow team members build IIS/ASP/VB/MTS e-commerce web sites, as well as client/server and distributed systems. Daniel sometimes longs for his simpler, statically linked days as an X-Base developer and DOS command line junkie, but today enjoys the power afforded by the arsenal of Microsoft's Windows DNA tools and technologies. His other interests include camping, crime fiction, listening to music of all sorts, and going to as many concerts as he can. He's not: sure if co-authoring a programming book will help him meet the woman of his dreams, but it sure would be nice.

Carsten Thomsen is a Microsoft Certified Systems Engineer, who started programming in Visual Basic back in 1993, when it was version 3.0. Presently he is pursuing Microsoft Certified Systems Developer certification and was recently awarded the MVP title for his contributions to the Microsoft Visual Basic newgroups. For the last 4 years he has been developing 2-tier and 3-tier client/server solutions based on MS SQL Server, MTS and MSMQ but has more recently been moving towards browser-based development, based on MS IIS, using ASP/VBScript, COM/ActiveX components and Visual Basic WebClasses.

In whatever spare time he has, he enjoys traveling and spending time with his two daughters, Nicole and Caroline, and his girlfriend Mia. He works out at a local gym and (at spectator-level) enjoys ice hockey and soccer. He is generally considered a computer freak, and spends too much time at the computer.

Piotr Prussak works for ACEN in Buffalo, NY as a developer (although he is originally from Poland). He creates ASP, VBandjava Applications for the company and its clients. He also spends some time working with the SQL server and ColdFusion, probably more than he should. When he's not programming and mentoring, he either writes stuff, or edits stuff written by others. Sometimes he sleeps, eats and relaxes like any other human being. In a past life he used to be a photographer, but that was just too relaxing.

Piotr (or Peter, as some might call him) is married to lovelyJoanne, who is an MIS student at a local University. Sometimes they travel all over the world and are disconnected from the world of computers and 24 hour Nws.

Brian Matsik is the President and Senior Consultant at OOCS in Charlotte, NC. He is MCSD certified and has been working with Visual Basic, VBScript, and VBA for over six years. He currently specializes in ASP, SQL Server, and VB COM. Brian can be reached at brianmat@oocs. com.

Brian would like to thank Tracy for her support, Mike Dunner for keeping him on his toes when it comes to ADO and MTS, and Mark Harris for taking care of the books while he stays glued to the PC.

After an initial start as a Visual Basic applications programmer, Paul Wilton found himself pulled into the net and has spent the last 18 months helping create internet and intranet solutions. Currently he is developing web-based systems, primarily using Visual Basic 6 and SQL Server 7, along with numerous other technologies.

Paul would like to wish lots of love to his fianc6e Catherine, who ensures his sanity chip remains plugged in.

Antonio De Donatis (adedona t is @yahoo. com) began programming in 1984, using a mixture of Basic and assembler on a Commodore 64. Since then, he has designed software the object-oriented way, employing more programming languages and technologies than he can count. He finds programming to be one of the best activities to exercise creativity and to be intellectually active. He has worked for many of the major firms in IT either as employee or as freelance. His current interests include all the technologies involved in the design and implementation of ecommerce solutions. Antonio holds a BS degree in Computer Science from Pisa University (Italy) and he is a Microsoft Certified Professional.

Susanne Clark has worked with the latest internet technologies, including DHTML, XML, XSL, IE5 programming and scripting, and has contributed chapters on these subjects to the recently published Professional Visual InterDev 6 Programming from Wrox Press. She is currently working as a user interfaces developer in Seattle, USA. When not dealing with computers, she enjoys spending time with her cats, and reading mystery books. Susanne would like to thank Luca for all of his patience and help. Ti amo.

Read More Show Less

Read an Excerpt


Chapter 1: A (Very) Short Introduction to Programming

In trying to squeeze the basics of writing computer programs into one chapter, we may be attempting the impossible, but we're going to do our best. The reason for including this chapter is that many people come to a scripting language, like VBScript, as their first language. Perhaps you're a network systems expert who wants to use VBScript and the Windows Script Host to write login scripts and automate administration tasks. Or perhaps you're a web designer who feels the need to branch out from the visual aspects of creating web pages and into writing scripts to drive content. Or perhaps you , re just a person who wants to learn a programming language for the fun of it. Either way, you've come to the right place.

Programming - or "writing code," as some people like to call it - is a huge subject. Many volumes have been written about it. During this chapter, in a single paragraph, we might introduce multiple unfamiliar concepts. We're going to move pretty fast, but if you read along closely and try out the examples, you'll probably be just fine.

Keep in mind that even an in-depth discussion of how to write computer programs might not even begin to touch on subjects such as architecture, systems design, database design, testing, documentation, and all the rest of the subjects that an accomplished software developer must master. But don't let all that discourage you. Everyone starts somewhere, and this is a great place for you to start learning the art and science of making a computer sing. Consider this chapter a brief introduction to the important building blocks. It won't make you an expert overnight, but hopefully it will give you a the know-how you'll need in order to get the most out of the rest of the book.

Variables and Data Types

In this section, we're going to be moving quickly through some of the most basic concepts of programming: variables, comments, using built-in VBScript functions, a other syntax issues.

The first concept we're going to touch on is that of variables. Simply put, a variable is a place in memory where your script holds a piece (or a set) of information (we'll use term data in place of "information" throughout most of this discussion). The data stored in a variable might be very simple, like the number 10,000, or very complex, such as a whole series of numbers, ranging from 1 to 10,000.

Behind the scenes, a variable is a reserved section of the computer's memory. just to make sure we're dear, memory is temporary working space for the computer. Memo is transient -that is, things that are placed in memory are not stored there permanently. That's what the hard drive is for. Since memory is transient, and since variables are stored in the computer's memory, variables are by extension transient a well. Your script will use variables to temporarily store a piece of information that the script needs to keep track of. (If your script needs to store that information permanently, it would store it in a file on the hard disk, or in a database, which is also stored permanently on the hard drive.)

In order to make it easier for the computer to keep track of all the millions of pieces 0 information that might be stored in memory at any given moment, memory is broke up into chunks. Each chunk is exactly the same size, and each chunk is given an address. You don't need to worry about memory addresses, but it's useful to know that a variable is a reserved set of one or more chunks. Different types of variables take up different amounts of memory. In your VBScript program, you will declare (or "dimension") variables before you use them, and you will give them a name in the process. Here's an example of a variable declaration in VBScript:

Dim CustomerName

When you declare a variable like this, you are basically telling the computer "Reserve some memory for me, and please give that memory the name CustomerName." The computer (or, more precisely, the VBScript engine) keeps track of that memory for you and whenever you use the variable name CustomerName, it will know what you're talking about.

Note: it is not strictly required that you declare all of the variables you use. VBScript by default allows you to use undeclared variables. However, we strongly recommend that you declare all of the variables you use in your scripts. We'll cover this topic in more depth in Chapter 2.

Variables are essential to the activity of writing a VBScript program (or any program for that matter). Without variables, you'd have no way of keeping track of all of the pieces of information your script is going to be manipulating, adding up, and displaying on the screen. Picture yourself at your desk keeping track of your household income and expenses in a paper-based ledger.

This process entails adding up and keeping track of multiple pieces of information: paychecks and other kinds of income, grocery expenses, automobile expenses, medical expenses, debt service, and so on. You'd keep each of these running totals in a separate column, and later you'd probably add them all up to create a view into your financial situation. If you were writing a computer program to keep up with all this information instead of using your paper-based ledger, you would probably store the permanent data in a database, but while your program was accepting input of the numbers and keeping track of the totals, it would use different variables to keep up with each different piece of information.

In VBScript, whenever you have a piece of information that you need to work with, you would declare a variable using the syntax we demonstrated a moment ago. At some point in your script, you're going to need to place a value in that variable otherwise, what would be the point of declaring it? Placing a value in a variable for the first time is called initializing the variable. Sometimes you initialize a variable with a default value. Other times, you might ask the user for some information, and initialize the variable with whatever the user types in. Or you might open a database and use a previously-stored value to initialize the variable.

Initializing the variable gives you a starting point. After its been initialized, you can use the variable in calculations, store it in a database, or display it back to the user in other form. Here's a simple VBScript example:

Dim DateToday

'Initialize the variable
DateToday = Date
MsgBox 'Today's date is DateToday

Now we've opened up a bit of a can of worms. What's all I that other stuff in this code? We'll look at it line-by-line. The first line is the variable declaration. We've asked the computer to reserve some memory for us, and to please remember the variable name DateToday for us.

All of the examples in this chapter are tailored so that they can be run by the Windows Script Host. The Windows Script Host is a scripting host that allows you to run VBScript programs within Windows. WSH will allow you to try these example programs out for yourself. You may already have WSH installed. To find out, type the above example script into a text editor, save the file as TEST. VBS, and double click the file in Windows Explorer. If the script runs, then you're all set. If Windows does not recognize the file, then you'll need to download and install WSH from http://msdn.microsoft.com/ scripting.

If you like, you car, skip ahead briefly and check out the beginning sections of Chapter 10. You don't need to read the whole chapter, just the first sections, which describe how to install the Windows Script Host, and how to use WSH to run scripts.

Let's get back to the code extract shown above. The second line is a comment In VBScript, any text that follows the single quote character ( ' ) is treated as a comment. This means that the VBScript engine will ignore this text. This introduces an interesting point: if the script engine is going to ignore this text, why type it in at all? It doesn't contribute to the execution of the script, right? This is correct, but it excludes one of most important principles of programming: it is equally important to write a script with human readers in mind as it is to write with the computer in mind.

Of course, when we are writing a script, we must write it with the computer (or, more specifically, the script engine) in mind, because if we don't type it in correctly (that is we don't use the correct syntax), the script engine won't execute the script. However, programming is an inherently human-involved activity. Once you've written some useful scripts, you're probably going to have to go back to make changes to a script you wrote six months ago. If you did not write that code with human readers in mini it might be difficult to figure out what in the world you were thinking at the time you wrote the script. Worse yet, what happens when one of your co-workers has to go in and make changes to a script you wrote six months ago? If you did not write that script to be readable and maintainable, your co-worker will probably curse you as they try to decipher every line of your code.

Adding good comments to your code is only one aspect of writing readable, maintainable programs. We'll touch on some other principles later, such as choosing good variable names, indenting properly, using white space in a helpful way, and organizing your code clearly and logically. That said, keep in mind that adding too many comments, or adding comments that are not useful, can make a script almost a bad as one with no comments at all, Also, if you are scripting for a web page that mu be downloaded to a user's browser, too many comments can affect the time that it takes to download the page.

We'll discuss some good commenting principles later in this chapter, but suffice it to say now that the comment in line two of our script is not really a good comment for everyday use. This is because, to any semi-experienced programmer, it is painfully obvious that what we are doing is initializing the DateToday variable. Throughout this book, you will often see the code commented this way. This is because the point our code is to instruct you, the reader, in how a particular aspect of VBScript programming works.

Back to our example script. It should now be clear that what we're doing in line three initializing the variable DateToday. To do this, we are using a built-in VBScript function called Date. A function is a piece of code that returns a value. VBScript comes with a lot of built-in functions. These functions are part of the language, and they're always available for your use. You can find a full listing of all of VBScript's built-in functions in Appendix A. The Date function is one such function that returns the current date according to the computer's internal clock. (In a few minutes, we'll get into the idea of writing your own functions.) In line three, we are telling the script engine, "Take the value returned by the Date function, and store it in the variable called DateToday." (Notice that we did not name the variable Date, but rather DateToday. This is necessary because, since Date is a built-in VBScript function, "date" is a reserved word. You cannot name your variables with the same name as a reserved word.)...

Read More Show Less

Table of Contents

Chapter 1 : A Short Introduction to Programming
Chapter 2 : Variables Data Types
Chapter 3 : Control of Flow
Chapter 4 : Error Handling and Debugging
Chapter 5 : Using COM Components and Objects
Chapter 6 : Using COM Objects with MTS
Chapter 7 : Scripting Runtime Objects
Chapter 8 : Classes in VBScript(Writing your own COM Objects)
Chapter 9 : Windows Script Components
Chapter 10 : The Windows Script Host
Chapter 11 : General Client-Side Web Scripting
Chapter 12 : High Powered Client Scripting: DHTML, Behaviors, HTML Components and Remote Scripting
Chapter 13 : HTML Applications (HTAs)
Chapter 14 : Server-Side Web Scripting with Active Server Pages
Chapter 15 : Talking to Databases: ActiveX Data Objects
Chapter 16: Microsoft Script Control

Appendices
A : Visual Basic Functions and Keywords
B : Differences Between VB/VBA and VBScript
C : Variable Naming and Other Code Conventions
D : Visual Basic Constants Supported in VBScript
E : VBScript Error Codes
F : The Scripting Runtime Object Model
G : The Windows Script Host Object Model
H : Microsoft Internet Explorer 4 Object Model
I : Microsoft Internet Explorer 5 Object Model
J : Active Server Pages Object Model
K : ActiveX Data Objects Object Model
L : The Microsoft Script Encoder

Read More Show Less

Customer Reviews

Average Rating 3.5
( 3 )
Rating Distribution

5 Star

(0)

4 Star

(1)

3 Star

(2)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 3 Customer Reviews
  • Anonymous

    Posted May 19, 2002

    Loaded with Useful data, but.....

    The author never does address what skill level is necessary to fully appreciate this book. From my reading it should be clarified at the beginning that this book is not for beginners. Being new to ASP I found this book very frustrating to follow. It wasn't until page 51 did the author decide to inform the reader exactly how to 'run' scripts in Windows. From cover to cover I felt the book was organized poorly. However,if I was a more experienced programmer I think that I would better understand the book's layout and be able to 'fish' through this convoluted book.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 21, 2000

    Good but frustrating

    I'd buy it again, BUT it is frustrating in many ways. It is poorly edited and a beginner/intermediate will have trouble finding needed information. One of many examples I have as I tried to find info on calling procedures and functions is this: a line on page 237 (ch. 8) states 'If you know how to write Function and Sub procedures (see Chapter 3), then you know how to write methods for a class.' CHAPTER THREE BARELY MENTIONS SUB OR FUNCTION, and DOES NOT DEMONSTRATE how either is called from your script.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted March 27, 2000

    Opens a whole new world

    This book opens a whole new world for developers new to this language. It allows executing batch files in windows, managing sites through ASP on the server side, and making visual affects on the client side. Any Internet developer should master this language and this book covers it well. It is a shame book does not come with cd rom that includes sample code

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 3 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)