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

How do I make the "break" command go back to my desktop?

Started by MarcoPolo0306, 22 April 2017 - 07:07 PM
MarcoPolo0306 #1
Posted 22 April 2017 - 09:07 PM
How do I make it so when I run break my desktop program will run instead of the screen being black?
Please help (=
Bomb Bloke #2
Posted 23 April 2017 - 01:44 AM
"break" from where?
Exerro #3
Posted 23 April 2017 - 01:40 PM
'break' stops early from a loop. It doesn't run programs. We'll need much more information about your setup to help though.
MarcoPolo0306 #4
Posted 23 April 2017 - 01:52 PM
"break" from where?

Break from a program.
Gumball #5
Posted 23 April 2017 - 07:32 PM
"break" from where?

Break from a program.

Break doesn't run anything, it pre-maturely cancels a while, for, or repeat loop. Unless you nested the entire operation inside of the desktop, you can't just "break" out into it. You have to run the desktop program again.
houseofkraft #6
Posted 23 April 2017 - 10:04 PM
It may be actually possible depending on what you're thinking of.


while true do
	print("Whatever")
	break
	os.sleep(0)
end

shell.run("/path/to/desktop")
Edited on 23 April 2017 - 08:04 PM