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

I need help

Started by Jeffrey2365, 26 October 2014 - 07:59 PM
Jeffrey2365 #1
Posted 26 October 2014 - 08:59 PM
Hello, world!

I want to make a program which will do when i say to computer number 1 will start a program on computer number 2

Currently what i have done:

c1 = peripheral.wrap("computer_37")
c2 = peripheral.wrap("computer_48")
c1.turnOn()
c2.turnOn()



so i need soemthing like c1.runProgram("startup")

But i can't nail it. I can't also find it in the Wiki.
johnnic #2
Posted 26 October 2014 - 09:38 PM
From my testing, albeit in previous versions and with MiscPeripherals, using computer.turnOn() does run the program named "startup". Make sure your program is named exactly that.
Bomb Bloke #3
Posted 26 October 2014 - 09:49 PM
That's assuming the "startup" script is stored on that computer's drive (as opposed to the drive of the computer which is turning the target on).

If you want computers to boot from a startup file that isn't on their drive, put it on a disk in a disk drive and connect that up to your network.
Jeffrey2365 #4
Posted 27 October 2014 - 11:59 AM
Oooogh now i get it! So with c1.turnOn() It can automaticcly run program "Stratup"? I have program "eco" what i did run.
Bomb Bloke #5
Posted 27 October 2014 - 01:37 PM
Er, more or less that, yeah.
AssossaGPB #6
Posted 27 October 2014 - 04:16 PM
Doing c1.turnOn() will turn that computer on and run the "startup" file on the c1 computer. If you want to run a program off your cdomputer on the computer you are starting up, you would want some kind of remote file transfer to occur at startup.
Jeffrey2365 #7
Posted 27 October 2014 - 06:57 PM
Okay thanks for help! For me all is working now perfectly :)/>! Admins or mdoerators can now CT