Previous Section Table of Contents Next Section

Chapter 6. Input and Output

IN THIS CHAPTER

Getting and displaying information is an essential function for most scripts. In this chapter, you'll learn the various ways that VBScript provides for this type of user interaction.

It's rare to need a script that doesn't involve some form of user interaction. At the very least, you might need to display some kind of completion message as an indication that your script has finished running. Sometimes, you'll need more complex interaction, such as the ability to ask Yes or No questions, get server names and other information, and so forth.

VBScript has very limited interactive capabilities. If you're expecting to create even simple dialog boxes like you've seen Visual Basic programmers do, forget about it: VBScript doesn't provide a dialog builder and doesn't provide any means for programmatically creating dialog boxes. If you need a custom user interface, you need to upgrade to a full-fledged programming environment like Visual Studio. VBScript's capabilities for interaction are limited to basic choices, simple messages, and one-line text input. However, in an administrative script, that's often all you'll need.

NOTE

The script examples in this chapter won't be full administrative scripts. Instead, I'll provide snippets that you can easily cut and paste into your own scripts whenever you need to display a message, ask for user input, and so forth.


    Previous Section Table of Contents Next Section