Can you Quit from monkey app

Monkey Forums/Monkey Programming/Can you Quit from monkey app

hardcoal(Posted 2011) [#1]
I mean like End in basic


MikeHart(Posted 2011) [#2]
Error("")



MikeHart(Posted 2011) [#3]
or (for glfw and stdcpp)

Import os
ExitApp(0)



hardcoal(Posted 2011) [#4]
thanx


Darky(Posted 2011) [#5]
And how to exit on android & iphone ?


MikeHart(Posted 2011) [#6]
See post #2


therevills(Posted 2011) [#7]
In Diddy I added this function:

Function ExitApp:Void()
	Error ""
End


So I can call "ExitApp" in all targets...


FlameDuck(Posted 2011) [#8]
Not all targets necessarily let you control the life-cycle of your "program". How do you "quit" a website? If your Android app is an Activity (which I'm pretty sure Monkey is), hitting the back button will end it, regardless of whether you want it to or not.


therevills(Posted 2011) [#9]
How do you "quit" a website


True... I guess you could write some javascript to actually close the window.

hitting the back button will end it, regardless of whether you want it to or not.


Nope, you need to code it in Monkey to do that:

If KeyHit(KEY_ESCAPE) ' maps to the back button in Android
   ExitApp() ' or Error ""
End