close the answer dialog from script
kray at sonsothunder.com
Fri Aug 24 12:48:47 CDT 2007
On Fri, 24 Aug 2007 16:26:07 +0200, paolo mazza wrote:
> Thanks for your help. I tryed to use the command
> close stack "Answer Dialog"
> Actually it closes the answer dialog but unfortunately the
> exit to top
> command in the following line does not work and the it does not stop.
What you need to do is set a flag in your closeAnswerDialog handler
that can be checked after the answer dialog line has been executed.
Since it's modal, once it closes, it will continue processing lines of
code after the "answer" command.
So you can do this:
put false into gBailOut
put the seconds into TempoIniziale
answer "You are great" with "OK" and "Annulla"
if gBailOut then exit to top
if it is "OK" then
put "1" into message
put "2" into message
put the seconds into TEMPO2
-- put TEMPO2 && TempoIniziale & return after message
if (TEMPO2 - TempoIniziale) > 4 then
put true into gBailOut
close stack "Answer Dialog"
exit to top
send "ControlloTempo" to me in 2 seconds
put the result into gTEMPOCONTROL
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode