The Wait command

Ralph DiMola rdimola at evergreeninfo.net
Fri Jun 24 19:51:03 CDT 2011


I am a nu-be to LC.

I needed to do this with a splash card. Display card for 7.5 second or until
the user mouse clicks the image.

Card script:

on openCard
    send "finishsplash" to me in 7.5 seconds
end openCard

on finishsplash
   open card "jb_search" --(Or whatever job need to be done)
end finishsplash



image script:

on mouseup
   open card "jb_search" --(or whatever job need to be done)
end mouseup


Ralph 


-----Original Message-----
From: use-livecode-bounces at lists.runrev.com
[mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of John Craig
Sent: Friday, June 24, 2011 5:07 PM
To: How to use LiveCode
Subject: Re: The Wait command

This works for what I understand the original scenario was.  If you 
click button 1, it waits either until the 10 seconds has elapsed or 
until button 2 is pressed.

:)


Add 2 buttons to a new stack;

1st button script;
on mouseUp
    set the uFlag of this card to false
    put the millisecs + 10000 into tTime
    repeat until the millisecs > tTime or the uFlag of this card = true
       wait for 100 millisecs with messages
    end repeat
    answer "OK"
end mouseUp


2nd button script;
on mouseUp
    set the uFlag of this card to true
end mouseUp



On 24/06/2011 21:52, Bob Sneidar wrote:
> See this is the perfect example of why some kind of multiple processing
thing is needed. If you say
>
> wait until<condition>  then no other processing can take place. Even in
the repeat loop it doesn't help. If the condition is triggered by some kind
of execution the even will never happen because you are waiting. I know we
hammered this to death in another thread, but this would be I think one of
the main reasons why it would be beneficial.

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




More information about the use-livecode mailing list