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

Run A Program From Another Program

Started by pokuit, 26 February 2012 - 11:38 AM
pokuit #1
Posted 26 February 2012 - 12:38 PM
I want to run my program for example the basic hello program from another program how do I do that?
Thanks
Liraal #2
Posted 26 February 2012 - 01:04 PM
shell.run(programpath)
pokuit #3
Posted 26 February 2012 - 01:17 PM
shell.run(programpath)
If I had a program called hello on the base computer what would the program path be.
MysticT #4
Posted 26 February 2012 - 01:54 PM
shell.run(programpath)
If I had a program called hello on the base computer what would the program path be.
It would be "/hello" :D/>/>
pokuit #5
Posted 26 February 2012 - 04:56 PM
shell.run(programpath)
If I had a program called hello on the base computer what would the program path be.
It would be "/hello" ;)/>/>
thanks so much sorry if stupid question :(/>/>
Zitrone77 #6
Posted 06 March 2012 - 02:01 PM
shell.run(programpath)
Hey, if i put the program in ("/.minecraft/mods/ComputerCraft/lua/rom/programs/MY PROGRAM")
So that it's accsessable from all computers.

What is the Path? i can't find out how the path is!
if i do something like shell.run("/.minecraft/mods/ComputerCraft/lua/rom/programs/MY PROGRAM")
It doesn't work!
Espen #7
Posted 06 March 2012 - 02:19 PM
From CC's perspective it's in "/rom/programs/".
In general you can use shell.resolveProgram("programname") to get the absolute path of any program.
Also, if you execute shell.getRunningProgram() from within a program, then you will get the absolute path of where the program is running from.
Edited on 06 March 2012 - 01:22 PM