4 posts
Location
Mars i think
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.
53 posts
Location
Somewhere in ****** County, *******
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.
7083 posts
Location
Tasmania (AU)
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.
4 posts
Location
Mars i think
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.
7083 posts
Location
Tasmania (AU)
Posted 27 October 2014 - 01:37 PM
Er, more or less that, yeah.
132 posts
Location
Florida, USA
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.
4 posts
Location
Mars i think
Posted 27 October 2014 - 06:57 PM
Okay thanks for help! For me all is working now perfectly :)/>! Admins or mdoerators can now CT