os.run

From ComputerCraft Wiki
Revision as of 20:10, 21 April 2013 by Hawk777 (Talk | contribs) (Explain how the parameters work)

Jump to: navigation, search


Grid Redstone.png  Function os.run
Executes a file from the filesystem. The Lua program contained in path is invoked. At its file-level scope, the program sees the usual global symbols plus everything in the envVars table. Any additional parameters passed after path are visible as ... from the called program.
Syntax os.run(table envVars, string path, ...)
Returns false on error, otherwise true
Part of ComputerCraft
API OS

Examples

Grid paper.png  Example
Runs the default shell.
Code
os.run({}, "rom/programs/shell")
Output The default shell