12 posts
Posted 21 January 2013 - 05:55 AM
Is it possible to put the program "excavate" into a script? Say if I wanted to modify it so it will run the excavate command then go to the top, drop all the items, then start the excavate program again.
afischaa
463 posts
Location
Germany
Posted 21 January 2013 - 06:00 AM
shell.run()
runs programs
1. Param.: Program,
2. Param.: Param 1 for the Program
Next time look at the wiki ^^
799 posts
Location
Land of Meh
Posted 21 January 2013 - 06:05 AM
Is it possible to put the program "excavate" into a script? Say if I wanted to modify it so it will run the excavate command then go to the top, drop all the items, then start the excavate program again.
afischaa
The excavate program is just a program found under the rom folder (found in /rom/programs/excavate). You can put it on pastebin to view using:
pastebin put /rom/programs/excavate
Or copy it to the root of your turtle using:
copy /rom/programs/excavate /myexcavate
Once you have access to it, you can start modifying it and making it do what you want.
EDIT: derrrrrrppppp. Just saw that you wanted to run the excavate program from another script. I should read more carefully….
8543 posts
Posted 21 January 2013 - 06:06 AM
Since shell.run now parses the line like the shell would, you can, in fact, place the whole shell command in the first parameter, like so:
shell.run("excavate 3")
Or even:
shell.run("gps host 35 253 17")