Re: close the answer dialog from script

2007-08-24 Thread Ken Ray
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:

global TempoIniziale,gTEMPOCONTROL,gBailOut
on mouseUp
 put false into gBailOut
 put the seconds into TempoIniziale
  ControlloTempo
  answer "You are great" with "OK" and "Annulla"
  if gBailOut then exit to top
  if it is "OK" then
put "1" into message
  else
put "2" into message
  end if
end mouseUp

on ControlloTempo 
  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
  else
send "ControlloTempo" to me in 2 seconds
put the result into gTEMPOCONTROL
  end if
end ControlloTempo

Try that...

Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: close the answer dialog from script

2007-08-24 Thread paolo mazza
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.

See this sample. This script put "2" into message even if I did not press
any button.

Have a good day. Paolo

global TempoIniziale,gTEMPOCONTROL
on mouseUp
 put the seconds into TempoIniziale
  ControlloTempo
  answer "You are great" with "OK" and "Annulla"
if it is "OK" then
put "1" into message
else
put "2" into message
end if  
end mouseUp

on ControlloTempo 
  put the seconds into TEMPO2
  -- put TEMPO2 && TempoIniziale  & return after  message
  if (TEMPO2 - TempoIniziale) > 4 then
close stack "Answer Dialog"
exit to top
  else
send "ControlloTempo" to me in 2 seconds
put the result into gTEMPOCONTROL
  end if
end ControlloTempo

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: close the answer dialog from script

2007-08-24 Thread Mark Schonewille

Hi Eric,

I tried it and it works. Thanks for this nice and simple solution.

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.com

Quickly extract data from your HyperCard stacks with DIFfersifier.  
http://differsifier.economy-x-talk.com



Op 24-aug-2007, om 13:01 heeft Eric Chatonet het volgende geschreven:


Hi Paolo,

You can use the usual answer dialog and have not to build your own:

on mouseUp
  send "CloseAnswerDialog" to me in 4 seconds
  answer "You are great"
end mouseUp
--
on CloseAnswerDialog
  close stack "Answer Dialog"
end CloseAnswerDialog



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: close the answer dialog from script

2007-08-24 Thread Eric Chatonet

Hi Paolo,

You can use the usual answer dialog and have not to build your own:

on mouseUp
  send "CloseAnswerDialog" to me in 4 seconds
  answer "You are great"
end mouseUp
--
on CloseAnswerDialog
  close stack "Answer Dialog"
end CloseAnswerDialog



Le 24 août 07 à 12:34, Eric Chatonet a écrit :


Hi Paolo,

close stack "Answer Dialog" :-)

Le 24 août 07 à 12:30, paolo mazza a écrit :


Dear Friends, how can I close the answer dialog from script?

I wrote this script to force  the user to answer after X time. But  
I can

not close the andswe dialog.

Thanks

Paolo


global TempoIniziale,gTEMPOCONTROL
on mouseUp
 put the seconds into TempoIniziale
  ControlloTempo
  answer "You are great" with "OK"
end mouseUp

on ControlloTempo
  put the seconds into TEMPO2
  -- put TEMPO2 && TempoIniziale  & return after  message
  if (TEMPO2 - TempoIniziale) > 4 then

  HOW CAN I CLOSE THE ANSWER DIALOG ??

exit to top
  else
send "ControlloTempo" to me in 2 seconds
put the result into gTEMPOCONTROL
  end if
end ControlloTempo


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: close the answer dialog from script

2007-08-24 Thread Klaus Major

Buongiorno paolo,


Dear Friends, how can I close the answer dialog from script?

I wrote this script to force  the user to answer after X time. But  
I can

not close the andswe dialog.

Thanks

Paolo


global TempoIniziale,gTEMPOCONTROL
on mouseUp
 put the seconds into TempoIniziale
  ControlloTempo
  answer "You are great" with "OK"
end mouseUp

on ControlloTempo
  put the seconds into TEMPO2
  -- put TEMPO2 && TempoIniziale  & return after  message
  if (TEMPO2 - TempoIniziale) > 4 then

  HOW CAN I CLOSE THE ANSWER DIALOG ??

exit to top
  else
send "ControlloTempo" to me in 2 seconds
put the result into gTEMPOCONTROL
  end if
end ControlloTempo


**

Paolo Mazza
NEOL SRL
Società partecipata da Università di Padova
via N. Tommaseo 84
35131 - Padova (Italy)
Tel 049- 2050147 - Fax 049-7964386
www.neol.it


add a handler that will close the dialog and "send" it right before  
you "Answer XYZ"

This will ONLY work with this technique!

Like:

on mouseUp
 put the seconds into TempoIniziale
  ControlloTempo
  send "close_the_dialog" to me in 2 secs
  ## or any other time...
  answer "You are great" with "OK"
end mouseUp

on close_the_dialog
  close stack "Answer Dialog"
end close_the_dialog
...

You will have to integrate this into your scripts.


Regards

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: close the answer dialog from script

2007-08-24 Thread Mark Schonewille

Hi Paolo,

You have to adjust the answer dialog itself with a preOpenStack script:

on preOpenStack
  send "close this stack" to me in 10 secs
  pass preOpenStack
end preOpenStack

You may have to integrate this script with existing code.

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.com

Quickly extract data from your HyperCard stacks with DIFfersifier.  
http://differsifier.economy-x-talk.com



Op 24-aug-2007, om 12:30 heeft paolo mazza het volgende geschreven:


Dear Friends, how can I close the answer dialog from script?

I wrote this script to force  the user to answer after X time. But  
I can

not close the andswe dialog.

Thanks

Paolo


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: close the answer dialog from script

2007-08-24 Thread Ian Wood


On 24 Aug 2007, at 11:30, paolo mazza wrote:


Dear Friends, how can I close the answer dialog from script?


The answer dialog box is modal - you can't do anything until the user  
dismisses it.


Sounds like you need to roll your own answer dialog, either by  
replacing the built-in one or (probably easier) faking one with a  
'regular' Rev window.


Ian
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: close the answer dialog from script

2007-08-24 Thread Eric Chatonet

Hi Paolo,

close stack "Answer Dialog" :-)

Le 24 août 07 à 12:30, paolo mazza a écrit :


Dear Friends, how can I close the answer dialog from script?

I wrote this script to force  the user to answer after X time. But  
I can

not close the andswe dialog.

Thanks

Paolo


global TempoIniziale,gTEMPOCONTROL
on mouseUp
 put the seconds into TempoIniziale
  ControlloTempo
  answer "You are great" with "OK"
end mouseUp

on ControlloTempo
  put the seconds into TEMPO2
  -- put TEMPO2 && TempoIniziale  & return after  message
  if (TEMPO2 - TempoIniziale) > 4 then

  HOW CAN I CLOSE THE ANSWER DIALOG ??

exit to top
  else
send "ControlloTempo" to me in 2 seconds
put the result into gTEMPOCONTROL
  end if
end ControlloTempo


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


close the answer dialog from script

2007-08-24 Thread paolo mazza
Dear Friends, how can I close the answer dialog from script?

I wrote this script to force  the user to answer after X time. But I can
not close the andswe dialog.

Thanks

Paolo


global TempoIniziale,gTEMPOCONTROL
on mouseUp
 put the seconds into TempoIniziale
  ControlloTempo
  answer "You are great" with "OK"
end mouseUp

on ControlloTempo 
  put the seconds into TEMPO2
  -- put TEMPO2 && TempoIniziale  & return after  message
  if (TEMPO2 - TempoIniziale) > 4 then

  HOW CAN I CLOSE THE ANSWER DIALOG ??
   
exit to top
  else
send "ControlloTempo" to me in 2 seconds
put the result into gTEMPOCONTROL
  end if
end ControlloTempo


**

Paolo Mazza
NEOL SRL
Società partecipata da Università di Padova
via N. Tommaseo 84
35131 - Padova (Italy)
Tel 049- 2050147 - Fax 049-7964386
www.neol.it

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution