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

Startup programs

Started by SilentDeath236, 28 July 2013 - 09:58 AM
SilentDeath236 #1
Posted 28 July 2013 - 11:58 AM
Topic: Startup programs

Once a startup program has started on a turtle is there a way to get to end it with out breaking the block. My turtles get stuck from time to time and its a pain to have to break them to get them going again.
AfterLifeLochie #2
Posted 29 July 2013 - 03:52 AM
Turtles have the same keyboard shortcuts as Computers - if you need to halt the program, you can press and hold CTRL+T to terminate the script. If you want to reboot the turtle, you can hold CTRL+R to reboot it.
albrat #3
Posted 29 July 2013 - 08:11 AM
I have started writing programs with exit commands (if I send a rednet command that matches the command to stop the program terminates. or in some cases turns on the possibility of CTRL+T termination… )

i think it is a good idea to include it… Just incase.

just add a "id,mess = rednet.receive(0.5)" into a part of your code that gets run often.. then a quick :: – if mess == "stopworking" and id == 12 then error("terminate by rednet") end
where 12 is your sender computers id. so only your computer can terminate the program…

it's a great way to shut down all your computers and turtles at once too. just goto your computer and send a broadcast … stopworking and everything shuts down. (my command is different) but the idea works.