Simple Dialogs in WSH

Simple Dialogs in WSHMost WSH scripts show results in dialog boxes or ask for user input. This chapter introduces a few techniques offered in JScript and VBScript to create dialogs within WSH scripts.

Using the Echo method
I have mentioned already the Echo method to show user dialogs within the Windows Scripting Host. You may use this method to show messages boxes from VBScript as well as from JScript in a simple manner. Now let’s have a second look into the details. The Echo method uses the following syntax:

Object.Echo Parameters

Object is here the Windows Scripting Host with the object name WScript. Therefore the next statement uses the Echo method of the WScript object:

WScript.Echo ….

The Echo method may be called with one or more parameters, separated by commas. These parameters are used to pass the information shown in the message box. I will show the handling of the Echo method in the next two samples.

Website: www.comune.anguillaraveneta.pd.it | Filesize: 84kb
No of Page(s): 14
Click here to download Simple Dialogs in WSH.

Related Tutorial

Tags: , , , , ,

Comments

Leave a Reply