Scripting > mrScript Command Line Runner > Using the mrScript Command Line Runner
 
Using the mrScript Command Line Runner
1 Open a Command Prompt. For example, on Windows 2000, from the Windows Start menu, choose Programs > Accessories > Command Prompt.
2 Type mrscriptcl followed by the path and name of the file you want to run and the options that you require.
Syntax
mrScriptCL filename.extension [<options>]
Parameter
filename.extension
The path, name, and filename extension of the mrScript file that you want to run. If the path or filename contains spaces, enclose filename.extension in " " (double quotation marks).
You do not need to specify the path if the file is in the current folder.
Options
/?
Displays the syntax and options.
/a: definition[= value]
Similar in use to the /d option, except that the value, if assigned, is always treated as a string. Therefore, do not enclose the value in "\" and \"".
/d: definition[= value]
Used to specify a definition that will be recognized by the mrPrePro preprocessor. The /d option is equivalent to including a #define (see #define and #undef) preprocessor directive in the mrScriptBasic script. Optionally, you can assign a value to a definition in which case the preprocessor will substitute any occurrences of the definition in the script with the value. If the value is a string, you must enclose it in "\" and \""; for example, "\"Hello world!\"".
To specify "\" immediately before \"", use a double "\". For example, "\"C:\LogFolder \\ \"".
You can specify more than one /d option when you run mrScriptCL. If the /u option is specified, any /d options will be ignored.
Identifiers that occur within string literals (quoted strings) are not replaced.
/f
Initialize COM as free threaded.
/g
Make script-level variables visible to functions and sub procedures. The /g option is equivalent to including the Option GlobalVariables statement in the mrScriptBasic script.
/h
Used with the /v option, this option displays hidden variables.
/i:<file>
Specify a type library to load for the script (for enums).
/l
Lists the registered parsers. In UNICOM Intelligence Data Model 2, there is only one registered parser, the mrScriptBasic parser.
/li: n
Set the input locale to n (which can be a hexadecimal or decimal value, such as 0x0406 or 1030).
/lo: n
Set the output locale to n (which can be a hexadecimal or decimal value, such as 0x0409 or 1033).
/loc:<location>
Optional. The package extraction destination. If a location is not specified, the default location (C:\Documents and Settings\<User Name>\Temp) is used to extract the .mrz or .dmz package and execute script.
/m: file
Specifies a Metadata Document (.mdd) file to use with the script. When you specify an MDM Document (.mdd) file in this way, the MDM document is created as in intrinsic variable (called MDM) in the script. This means that you do not need to use the CreateObject function to create an instance of the MDM Document in your script. The Document opens in read-only mode, so you need to call the Document.Open method only if you want to open it in another mode, such as read-write.
/n
Used with the /o option, this option displays the opcodes only.
/o
Displays the opcodes generated by the script. When you run a script, it is represented as a compact intermediate code called p-code, which is processed into native machine code at run-time. Each opcode represents an individual step within the p-code representation. This option is typically used for debugging.
/p: parser
Parses the script using the specified parser. If you do not specify a parser, the default parser (mrScriptBasic) is used.
/r
Parses the script without executing it.
/s
Suppresses the “mrScript Command-line Utility” and copyright text.
/t
Displays the parse and execution timings.
/u
Do not run the mrPrePro preprocessor.
/v
Displays the variables generated by the script and shows their values when the script exits.
/x
Debug the script. See Command line runner: Debug options.
See
mrScript Command Line Runner