Displaying Passed Parameters in a Message Box

 

To display the total number of command line parameters, use param0 as a variable in a message box. WinBatch works like the DOS Batch language to put parameters into text. Enclosing them in percent (%) signs works in WinBatch, too.

 

This example is a simple one line WinBatch function that:

 

  1. Designs a dialog box with an OK button. 

  2. Specifies a title. 

  3. Specifies a message. 

  4. Puts varying information into the title or the message. 

  5. Formats the message in more than one line. 

  6. Returns a value that can indicate whether the operation has succeeded or not. 

 

The Message function has this form:

 

Message("title in quotes","message in quotes")

 

The actual statement used to produce this dialog box was:

 

Message("%param0% Parameter(s)", "The first was==> %param1%")

 

It produced:

 

image\05_parm_shg.gif

 

The command line which produced the statement above was:

 

image\09_parm_shg.gif

 

Note: Full path names were used for both the WinBatch executable file and for the WinBatch utility. Spaces separate the three parts of the command line.

 

 

Parameters

Passing Parameters between Script Files

Writing a Script

Menu Files

Ways to run WinBatch Scripts