exiting program
Author |
Message |
Unknown25
|
Posted: Sun Jan 15, 2012 1:44 pm Post subject: exiting program |
|
|
What is it you are trying to achieve?
To exit program when mouse is clicked on a specific location
What is the problem you are having?
I can't find the correct command to do so
Describe what you have tried to solve this problem
So basically the home page is a picture that has 3 buttons. Play, instructions and exit. When you click exit I don't want to program to just stop but to close.
I tried putting exit but it doesn't exit the actual program but stops it.
So there is no actual button, it is just one picture but the picture design has buttons.
Please specify what version of Turing you are using
The latest.
So what code should I use.
So I am using buttonwait, when I click on that section of the picture, (where it says exit), for the program to actually exit/close.
Thanks a lot for your help in advance. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Aange10
|
Posted: Sun Jan 15, 2012 1:58 pm Post subject: RE:exiting program |
|
|
Well, your at least on the right track. To close the window, you simply use Window.Close (id). But there is a great tutorial for that here.
Buttonwait is terrible, in my opinion. I'd suggest using any of the clicking modules at module. It can be quite useful to use other people's tools.
Aange10's Simple Cliking
Zren's Advanced Input / Clicking |
|
|
|
|
|
Unknown25
|
Posted: Sun Jan 15, 2012 3:26 pm Post subject: RE:exiting program |
|
|
Thanks, it took me a while but I learned how to do it. And I will also check out those modules too. |
|
|
|
|
|
tg851
|
Posted: Mon Jan 16, 2012 11:01 am Post subject: Re: exiting program |
|
|
to just make it totaly quit the program,the
command Error.Halt comes to mind
a simple example
Turing: |
put"press enter to quit"
var chars : array char of boolean
loop
Input.KeyDown (chars )
if chars (KEY_ENTER ) then
Error.Halt("program quit")
end if
end loop
|
useful for bulletproofing,for when issued,it will unconditionally end the program,and is quite easily used.plus the message is customizable,good for a game over blurb or something similar |
|
|
|
|
|
|
|