9 posts
Posted 24 February 2012 - 11:31 PM
I am currently having problems finding a way to get computers to send a program to a turtle, so is there any simple way to do that without having to stop the private server i run to put on APIs or new OSes or such? Im trying to keep from having to use rednet but if its the only way ill try it out.
473 posts
Location
Poland
Posted 24 February 2012 - 11:37 PM
You actually can do that, just define a variable like a=function() print("HEY") return true end then send it and call it like a(). Not sure whether rednet would handle this, however.
Im making a net library now, so if you dont mind some waiting time i can put it up a function for this tomorrow or so.
9 posts
Posted 24 February 2012 - 11:44 PM
I can't say i understand how that would send a program from a computer onto a turtle.
411 posts
Posted 25 February 2012 - 12:24 AM
You can have the turtles collect a program from a diskdrive ?
9 posts
Posted 25 February 2012 - 12:31 AM
Okay, but how would i go about doing that? I've tried using copy but i cant seem to find out how to get it to copy off of the disk, and i have seen that copy from post but it wasn't much help because i couldn't get the suggested copy format to work.
79 posts
Posted 25 February 2012 - 01:14 AM
Two ways you could collect files from a disk drive:
In a script:
fs.copy("disk/yourfile", "copiedname")
shell.run("cp", "disk/yourfile", "copiedname")
Using the copy program just type on the desktop:
cp disk/yourfile copiedname
I could be wrong but thats how i do it :P/>/>
9 posts
Posted 26 February 2012 - 06:27 PM
Thanks a bunch coolblock, it works perfectly.