Countdown HH:MM:SS
Roger Eller
roger.e.eller at sealedair.com
Wed Jul 20 07:56:09 EDT 2011
On Wed, Jul 20, 2011 at 2:12 AM, Ken Ray wrote:
>
> On Jul 19, 2011, at 10:00 PM, DunbarX at aol.com wrote:
>
> > Hi.
> >
> >
> > Shorter? It already can be pretty short. MUCH shorter? Where's Colin?
>
> Here's the fastest way I know:
>
> on mouseUp
> DisplayTime
> end mouseUp
>
> on DisplayTime
> put the long time into tTime
> convert tTime to dateItems
> split tTime by ","
> put format("%02d:%02d:%02d",tTime[4],tTime[5],tTime[6]) into fld "Time"
> send "DisplayTime" to me in 1 second
> end DisplayTime
>
>
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>
Using the dateItems is definitely the right direction, but my objective is
to count backwards from for example; 2 hours, 45 minutes, and 59 seconds
while updating the display field every second. When the countdown reaches
00:00:00, I would play a sound of do other actions.
˜Roger
More information about the use-livecode
mailing list