cancel a wait
Devin Asay
devin_asay at byu.edu
Thu Jan 17 10:46:00 EST 2008
Chris,
The waitDepth property might also help you. It will return the number
of currently running handlers paused at a 'wait with messages'
statement.
On Jan 16, 2008, at 9:32 PM, Kay C Lan wrote:
> On Jan 17, 2008 1:27 AM, Chris Sheffield <cmsheffield at gmail.com>
> wrote:
>
>> Is there any way to cancel a wait command?
>>
>> So I'm wondering, if a user moves to that second card before the
>> audio
>> of the first card finishes, is there some way to cancel that
>> wait...with messages? Does that make sense? Let me know if I need to
>> clarify.
>>
>
> I just created a quick test stack, two buttons, one with a script
> to beep,
> wait 5 seconds with messages then beep again. The other button with
> a script
> "exit to top". Clicking the second button prevented the second beep
> from
> occurring.
>
> The docs says to use exit to top 'to stop executing the current
> handler and
> suppress pending messages'
>
> Suppress pending messages being what you're looking for I think.
>
> My guess is a well placed 'exit to top' at the very end of a closeCard
> handler in your first card might do the trick.
I've also used this technique successfully.
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list