|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Special Files > The !COMMAND.!!! file |
Mechworks PDM checks for the presence of the file !COMMAND.!!! in the USERS\<username> directory, and, if present, executes the commands contained in it.
<shell command>
[SCRIPT_ARGUMENTS]
[line for script input]
[line for script input]
[line for script input]
...
Starting from R13sp2.1 the scheduler has been improved for allowing a correct first-in-first-out management of the message queue.
<shell command> |
a command for the DBWorks Api shell |
|---|---|
[SCRIPT_ARGUMENTS] |
Optional. If present, tells to DBWorks to read the next lines in the file and to convert them in input arguments for the next script being executed by DBWorks |
[line for script input] |
It is a line defining a script DBWInput argument, normally with the format: |
This is an example of !COMMAND.!!! file;
if the logged user is JOHN, the file is USERS\JOHN\!COMMAND.!!!
ExecScript myScript.vbs
SCRIPT_ARGUMENTS
MYARG1=value1
MYARG2=value2
When this file is present in the USERS\<username> directory, DBWorks will:
1.Execute the script LST\myScript.vbs
2.Pass to the script the two arguments MYARG1 and MYARG2 defined in the message
The script myScript.vbs may be written as follows:
Sub main()
myArg1 = DBWInput("MYARG1")
myArg2 = DBWInput("MYARG2")
MsgBox "myArg1=" & myArg1 & " myArg2=" & myArg2
End sub
When running, the script will show:
myArg1=value1 myArg2=value2