Jump to content




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


5 replies to this topic

#1 MarcoPolo0306

  • Members
  • 71 posts
  • LocationEverywhere and nowhere.

Posted 22 April 2017 - 08: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 (=

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 23 April 2017 - 12:44 AM

"break" from where?

#3 Exerro

  • Members
  • 801 posts

Posted 23 April 2017 - 12: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.

#4 MarcoPolo0306

  • Members
  • 71 posts
  • LocationEverywhere and nowhere.

Posted 23 April 2017 - 12:52 PM

View PostBomb Bloke, on 23 April 2017 - 12:44 AM, said:

"break" from where?

Break from a program.

#5 Gumball

  • Members
  • 254 posts
  • LocationFairbanks, Alaska

Posted 23 April 2017 - 06:32 PM

View PostMarcoPolo0306, on 23 April 2017 - 12:52 PM, said:

View PostBomb Bloke, on 23 April 2017 - 12:44 AM, said:

"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.

#6 houseofkraft

  • Members
  • 170 posts
  • LocationUSA

Posted 23 April 2017 - 09: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 by houseofkraft, 23 April 2017 - 09:04 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users