This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
dasangrypanda's profile picture

Help? How to run a program from code.

Started by dasangrypanda, 08 May 2012 - 02:56 AM
dasangrypanda #1
Posted 08 May 2012 - 04:56 AM
I'm trying to get a custom made program to run from another program, im sure you can tell by this question that im REALLY new to lua. So if some one could tell me how to do this, id be eternally greatful, thanks so much.
libraryaddict #2
Posted 08 May 2012 - 04:59 AM
To start another program from inside a program.

Try shell.run("ProgramName")
dasangrypanda #3
Posted 08 May 2012 - 05:10 AM
To start another program from inside a program.

Try shell.run("ProgramName")

thank you so much, this opens up my options a great deal.
Xtansia #4
Posted 08 May 2012 - 05:32 AM
Just thought I would add:
You can add arguments to calling the program,
Lke say on a turtle you might call:
go up 5
You would do this:

shell.run("go", "up", "5") --shell.run("programName", "arg1", "arg2" ......)
EpicCenter #5
Posted 28 January 2014 - 03:22 PM
I understand, but how do you execute the argument with a variable?
CometWolf #6
Posted 28 January 2014 - 03:27 PM
such dead, much necro
you would pass it the variable like any other function

shell.run("/program",variable1,variable2)