WinBatch Command line
A command like this runs a WinBatch system utility from a command line or an icon: winbatch.exe filename.wbt param1 param2.. param[n]
Parameters passed to a WBT file will be automatically inserted into variables named param1, param2, etc. An additional variable, param0, gives you the total number of command-line parameters. This command line can be entered into a Command Line text entry box like this one from the Windows "START…Run.." menu option.
The command line is longer than the dialog can show, but it can be easily edited with the arrow keys. WINBATCHFILENAME is the generic name of your WinBatch executable. The specific, or actual, name for the WinBatch application will change to reflect the operating system in use.
"filename.wbt" is any valid WBT file, and is a required parameter.
"p1 p2 ... p[n]" are optional parameters to be passed to the WBT file on startup. Each is delimited from the next by one space character.
In order to pass parameters to a WinBatch script file, you must run the WinBatch executable, itself, and it must be followed by the name of the WinBatch script file and any other desired parameters. IMPORTANT: If any of the parameters contain a space, make sure to wrap the parameter in double quotes. WBT files run from the Desktop as shortcuts must have their complete path in the Properties dialog box in order for command line parameters to be received. For example, the command line for "MAIL.WBT", an imaginary WinBatch utility that runs mail with a password passed as a parameter might be:
"C:\WINBATCH\SYSTEM\WINBATCH.EXE" "C:\WINBATCH\MAIL.WBT" PASSWORD
To edit the shortcut icon properties, highlight the shortcuts icon, hold down ALT, and press ENTER. The shortcuts properties box should look like the following:
The password parameters passed to the MAIL.WBT file will be automatically inserted into the variable param1. The beginning of the MAIL.WBT code might look something like this: If param0 != 1 Pause( "Notice", "This script requires 1 parameter to be passed: [password]") Exit EndIf password = param1 ; { remaining mail code goes here } Exit WinBatch+Compiler Command lineA command like this runs the WinBatch+Compiler from a command line or an icon: "C:\Program Files\WinBatch\System\WBCompiler.exe" "{.wbt}" "C:\Program Files\WinBatch\System\WBCompiler.exe" "{.cmp}"
A command like this runs the WinBatch+Compiler in Batch compile mode from a command line or an icon: "C:\Program Files\WInBatch\System\WBCompiler.exe" "{.cmplist}"
|