Insider Power Techniques for Microsoft Windows XP [Electronic resources]

Paul McFedries

نسخه متنی -صفحه : 126/ 21
نمايش فراداده

Displaying Text Using the WScript Object

The WScript object represents the Windows Script Host applications (Wscript.exe and Cscript.exe). This object contains a number of properties and methods, but the one you’ll use most often is the Echo method, which displays text to the user. Here’s the syntax:

WScript.Echo [Argument1, Argument2,...]

Here, Argument1, Argument2, and so on, are any number of text or numeric values that represent the information you want to display to the user. In the Windows-based host (Wscript.exe), the information is displayed in a dialog box; in the command-line host (Cscript.exe), the information is displayed at the command prompt (much like the command-line ECHO utility).

Note

For a complete reference to the Windows Script Host objects, see the following MSDN page:

http://msdn.microsoft.com/library/en-us/script56l/wsoriwshlanguagereference.asp