This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Syntax for "shell.run()"?
Started by Matrixmage, 24 September 2012 - 04:47 PMPosted 24 September 2012 - 06:47 PM
I've recently been trying to make a turtle program to make GPS towers, and I haven't really down anything with turtles up to this point, I am currently working on the part that will place down the computers and boot them running the "gps host" program. My understanding of the "shell.run()" code is that whatever programs name is in the brackets, it will run. Now when I put that in a program with "gps run" in the brackets and try to run it, I get "No Such Program" and when I try to edit the program again, the "shell.run()" is still there. Can anyone help?
Posted 24 September 2012 - 06:56 PM
shell.run("gps","run")
Posted 24 September 2012 - 06:57 PM
Google is your freind:
http://computercraft.info/wiki/index.php?title=Shell.run
http://computercraft.info/wiki/index.php?title=Shell.run
Posted 24 September 2012 - 07:06 PM
shell.run("gps","run")
Google is your freind:
http://computercraft...title=Shell.run
Thanks, I googled it before but I couldn't find it… Thanks again!
EDIT: I saw someone use a turtle to interact/boot a computer, does anyone know the code?
Posted 24 September 2012 - 07:23 PM
EDIT: I saw someone use a turtle to interact/boot a computer, does anyone know the code?
local c = peripheral.wrap("sideofcomputer")
c.turnOn()
--use c.shutdown() to shutdown computer
Posted 24 September 2012 - 07:49 PM
EDIT: I saw someone use a turtle to interact/boot a computer, does anyone know the code?local c = peripheral.wrap("sideofcomputer") c.turnOn() --use c.shutdown() to shutdown computer
thanks, but what peripheral is the "peripheral.wrap()" referring to?
Posted 24 September 2012 - 07:58 PM
the computer you want to boot. Computers and turtles can use other computers and turtles as peripherals.
With turtles, remember that their tool, peripheral, and chest count as peripherals on that side, so you can't wrap a peripheral block on those sides.
With turtles, remember that their tool, peripheral, and chest count as peripherals on that side, so you can't wrap a peripheral block on those sides.
Posted 24 September 2012 - 08:07 PM
the computer you want to boot. Computers and turtles can use other computers and turtles as peripherals.
With turtles, remember that their tool, peripheral, and chest count as peripherals on that side, so you can't wrap a peripheral block on those sides.
Ok, thanks, if I understand, I want to have the side be the side of the turtle that the computer will be on?
Posted 25 September 2012 - 01:52 PM
You wrap it to the side of the thing you want to turn on