System Functions in DIAL

The system functions in DIAL perform miscellaneous system tasks.

Function Description

system.execute("command")

Runs the specified command as a subprocess of DIAL. The output of the command is included in the DIAL output.

system.exit()

Exits DIAL, ending the specified script. You can specify an integer return code, directly or with a parameter, to return an exit code from a DIAL script back to, for example, a calling Production script. If a parameter is not specified, 0 is returned.

System Example

The following example demonstrates the system function usage.

// Check if the first argument after the script name is "Yes"

// If it is not, exit the script with a return code of "-1"

if(arg.get(1) != "Yes")

{

console.writeln ("I will stop");

system.exit(-1);

}

// If the argument is "Yes", run the specified command

console.writeln ("I will continue processing");

system.execute("explorer.exe");