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

[Question] How do i run a program from within one

Started by invis45, 20 March 2012 - 10:48 PM
invis45 #1
Posted 20 March 2012 - 11:48 PM
I was wondering how i could get a program to launch another one when a word is entered?
Im trying to get a menu to boot a different program when a value is typed in
Espen #2
Posted 21 March 2012 - 12:30 AM
shell.run("path to program")
invis45 #3
Posted 21 March 2012 - 12:31 AM
thank you so much, your a great help to a noob like me
lua.learner() #4
Posted 22 March 2012 - 08:30 AM
and can i run programs like copy <path> <path> or eject <side> by using shell.run?
Ian-Moone #5
Posted 22 March 2012 - 08:45 AM
no for that you would need to do

fs.copy("path to copy", "path to paste")
or

shell.run("eject","side")
if that's any help
lua.learner() #6
Posted 22 March 2012 - 10:20 AM
It says access denied!
Wolvan #7
Posted 22 March 2012 - 12:01 PM
It says access denied!
when you try to do what exactly?
lua.learner() #8
Posted 22 March 2012 - 01:02 PM
while true do
x = io.read()
fs.copy(x," disk/"..x)
end
Liraal #9
Posted 22 March 2012 - 01:07 PM

fs.copy(x,"disk/"..x)
without the whitespace
lua.learner() #10
Posted 22 March 2012 - 01:23 PM
Thanks a lot for a quick answer!