![]() |
Table of Contents |
![]() |
Chapter 5. Functions, Objects, Variables, and MoreIN THIS CHAPTER You've learned how to design a script, but you're not quite ready to write one. First, you have to learn the basics of VBScript, and this chapter begins your crash course. Scripting is, of course, a form of computer programming, and computer programming is all about telling a computer what to do. Before you can start ordering the computer around, though, you need to learn to speak a language that it understands. VBScript is one such language, and in this chapter, I'll introduce you to the VBScript syntax, or language. Almost all computer programming languages, including VBScript, have a few things in common.
NOTE The capability to interact with objects is not the same thing as being an object-oriented programming language. Although the concepts and benefits of object-oriented programming are beyond the scope of this book, suffice to say that VBScript isn't object oriented, despite its capability to interact with objects created in other languages. VBScript implements these common programming elements through variables, functions, and statements, and through an object interface.
In this chapter, you'll learn how to use each of these elements within scripts. NOTE I've never liked programming books that provide short, useless snippets of script as examples, even as early in the book as you are right now. Most of the examples you'll see in this and subsequent chapters are fully functioning scripts that you can actually use in your environment. Of course, to make them fully functioning, they have to include some things that you won't learn about until later chapters. That's OK; I'll point out the parts of the scripts that are important for now, and as you read through the next few chapters in Part II, you'll learn more and more about how these scripts operate. |
![]() |
Table of Contents |
![]() |