system
Call an external program via the system call
Plugin opcode in system_call.
system and system_i call any external command understood by the operating system, similarly to the C function system()
. system_i runs at i-time only, while system runs both at initialization and performance time.
Syntax
Initialization
Scmd -- command string
itrig -- if greater than zero the opcode executes the command; otherwise it is an null operation.
Performance
ktrig -- if greater than zero and different from the value on the previous control cycle the opcode executes the command. Initially this previous value is taken as zero.
inowait,knowait -- if given an non zero the command is run in the background and the command does not wait for the result. (default = 0)
ires, kres -- the return code of the command in wait mode and if the command is run.In other cases returns zero.
More than one system command (a script) can be executed with a single system opcode by using double braces strings {{ }}.
Note
This opcode is very system dependant, so should be used with extreme care (or not used) if platform neutrality is desired.
Examples
Here is an example of the system_i opcode. It uses the file system.csd.
See also
Credits
Author: John ffitch
2007
New in version 5.06