run

Syntax

run(scriptFile, [newSession=false], [clean=true])

Arguments

scriptFile is the path of the script file.

newSession indicates whether to create a new session to execute the script.

clean indicates whether to clean the variables in the current session. The default value is true, meaning the variables will be cleaned after executing run.

Details

Execute a saved program. It must be executed by a logged-in user. If newSession = false, the program runs in the current session. If newSession = true, the program file runs in a newly created session which will be closed after finish running the script.

Examples

$ run "c:/test.script";
$ d = dict(STRING, ANY)
$ d["TradePrice"] = 1..1000
//The variable d defined in the current session is not cleaned as the parameter clean is set to false.
$ run("c:/test.script", clean=false)
$ parseExpr("avg(TradePrice)",d).eval()
500.5