RunScript

From Moving Light Assistant
Revision as of 15:44, 14 March 2015 by Andyv wiki admin (Talk | contribs) (Add Page.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

RunScript( scriptName )

scriptName is a string which is the name of the script to run.

RunScript allows you to run another script from within a script. When RunScript is encountered in a script, it will allow the specified script to run until it is completed before continuing. The script name will the name of the script file as it appears in the Manage Scripts dialog.

Example.

io.write("Main script started", "\n")
RunScript("MySubScript")
io.write("Main script finished", "\n")

This would write out to the output window that the main script has started, then run the specified script MySubScript then when it is done, write out to the output window that the main script has finished.