roadrunner116 Posted October 18, 2015 Posted October 18, 2015 Hi, how do I terminate my program, so the user is able to get back to openOS? Thanks! Quote
0 Gangsir Posted October 23, 2015 Posted October 23, 2015 Press CTRL+ALT+C. Or, reboot the PC. Inside your code, you can also use os.exit() Quote
0 roadrunner116 Posted October 27, 2015 Author Posted October 27, 2015 Sorry. Like i wrote in my other post, I was away for a week. Those three way are the ways I know. I would like to Terminate the script from inside my code, but os.sleep() just does nothing. This is the way I tried to close the Application. function buttonConfTerm(name, data, playerName) gui.flashButton(name,0.1,2) os.exit() end The button flashes and if I put in a print() it also prints my text. So the touch-event handling seems to work Quote
0 mpmxyz Posted October 28, 2015 Posted October 28, 2015 Is this function called within an event handling function or do you handle events "manually" in your main loop? os.exit() internally works by throwing an error. Due to that it isn't working within event listeners. (Listener errors are just written to a file and not forwarded to the main code.) If you want it to work correctly you have to have some kind of variable like "keepRunning" that finishes your main loop when changed. By the way: Don't forget to event.ignore before stopping your program! Quote
Hi,
how do I terminate my program, so the user is able to get back to openOS?
Thanks!