Previous Section Table of Contents Next Section

Review

Scripts can be made more general-purpose when they're capable of collecting input and customizing their behavior based upon that input. You can have scripts connect to different servers, create user accounts, delete files, and perform hundreds of other actions when you're able to collect and evaluate user input when the script is run.

Using MsgBox allows you to display messages, even those with some basic formatting. You can also ask for simple Yes/No decisions from the user by using MsgBox() as a function. WScript.Echo provides text-output capabilities that work within a graphical WScript or command-line Cscript environment.

InputBox() allows you to collect text input from a graphical script, and you can use WScript.StdIn to collect text input within a command-line script. You can also use script command-line parameters to create scripts that work just like Windows' built-in command-line tools, complete with named parameters that customize the script's behavior.

COMING UP

In the next chapter, you'll start learning how to manipulate data in VBScript. I'll start with numeric data in Chapter 7, move on to string data in Chapter 8, and finish up with other types of data in Chapter 9.

    Previous Section Table of Contents Next Section