Jump to content




Help? How to run a program from code.


5 replies to this topic

#1 dasangrypanda

  • New Members
  • 6 posts
  • LocationUtah

Posted 08 May 2012 - 03: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.

#2 libraryaddict

  • New Members
  • 195 posts

Posted 08 May 2012 - 03:59 AM

To start another program from inside a program.

Try shell.run("ProgramName")

#3 dasangrypanda

  • New Members
  • 6 posts
  • LocationUtah

Posted 08 May 2012 - 04:10 AM

View Postlibraryaddict, on 08 May 2012 - 03:59 AM, said:

To start another program from inside a program.

Try shell.run("ProgramName")

thank you so much, this opens up my options a great deal.

#4 Xtansia

  • Members
  • 492 posts
  • LocationNew Zealand

Posted 08 May 2012 - 04: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" ......)


#5 EpicCenter

  • Members
  • 13 posts

Posted 28 January 2014 - 03:22 PM

I understand, but how do you execute the argument with a variable?

#6 CometWolf

  • Members
  • 1,283 posts

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)






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users