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/script56/html/wsoriwshlanguagereference.asp




Insider Power Techniques for Microsoft Windows XP
Insider Power Techniques for Microsoft Windows XP (Bpg-Other)
ISBN: 0735618968
EAN: 2147483647
Year: 2005
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net