Method script.runWait(+ 2 overloads)
Overload
Starts executing a script and waits until the task ends.
public static int runWait(string script, params string[] args)
Parameters
script (string)
Script name like |
args (string[])
Command line arguments. In the script it will be variable args. Should not contain |
Returns
int
The exit code of the task process. See System.Environment.ExitCode. |
Exceptions
FileNotFoundException
Script file not found. |
AuException
Failed to start script task, for example if the script contains errors or cannot start second task instance. |
Overload(next)
Starts executing a script, waits until the task ends and then gets script.writeResult text.
public static int runWait(out string results, string script, params string[] args)
Parameters
results (string)
Receives script.writeResult text. |
script (string)
Script name like |
args (string[])
Command line arguments. In the script it will be variable args. Should not contain |
Returns
int
The exit code of the task process. See System.Environment.ExitCode. |
Exceptions
FileNotFoundException
Script file not found. |
AuException
Failed to start script task, for example if the script contains errors or cannot start second task instance. |
Overload(top)
Starts executing a script, waits until the task ends and gets script.writeResult text in real time.
public static int runWait(Action<string> results, string script, params string[] args)
Parameters
results (Action<string>)
Receives script.writeResult output whenever the task calls it. |
script (string)
Script name like |
args (string[])
Command line arguments. In the script it will be variable args. Should not contain |
Returns
int
The exit code of the task process. See System.Environment.ExitCode. |
Exceptions
FileNotFoundException
Script file not found. |
AuException
Failed to start script task. |