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

Redirecting to Craft OS

Started by Christian77777, 31 January 2013 - 03:41 PM
Christian77777 #1
Posted 31 January 2013 - 04:41 PM
I made this password program that when it gets the correct password, it does nothing. I want to make it open up TO Craft OS, and not another OS i have to put the code in
I dont know how to do that, i looked everywhere and cant find the answer, so if there is a simple line to open up Craft OS after the password, can you please tell me so i may finish my program? Of course, when it opens up to Craft OS, it cant go back to the password thing unless it does os.shutdown or reboot.
Lyqyd #2
Posted 31 January 2013 - 05:59 PM
Split into new topic.
LBPHacker #3
Posted 31 January 2013 - 06:46 PM
If you have a while true do loop, and you want to launch CraftOS INSIDE that loop, try
shell.run("shell")
When the user types "exit", it will return to your program.
Orwell #4
Posted 31 January 2013 - 06:49 PM
Indeed, and if you want to return to the top shell, you can simply do:

error()
You won't be able to return back to your program then.