Message: 15
Date: Wed, 20 Jul 2011 15:19:07 -0400
From: Roger Eller roger.e.el...@sealedair.com
To: How to use LiveCode use-livecode@lists.runrev.com
Subject: Re: Countdown HH:MM:SS
Message-ID:
CAAT6EXPFGQY-=S6irWxERo3BXK=ftn5y+bjdn55plqvz3lk...@mail.gmail.com
Content-Type: text
On Jul 19, 2011, at 10:00 PM, dunb...@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
On Wed, Jul 20, 2011 at 2:12 AM, Ken Ray wrote:
On Jul 19, 2011, at 10:00 PM, dunb...@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
Roger
Is this what you are looking for?
on mouseUp
set itemdel to :
put the long time into tTime
put char 1 to -4 of tTime into field 1
convert tTime to dateItems
set the hms of me to tTime
countDown
end mouseUp
on countDown
put the hms of me into temp
subtract 1
Roger,
I forgot the stop clause. Maybe:
if field 1 is 0:0:0 then --or whatever
--Do your business
else
send countDown to me in 1 sec
end if
Roger
Is this what you are looking for?
on mouseUp
set itemdel to :
put the long time into tTime
put char 1 to -4 of tTime into
Hey as long as we are talking about dates and times, I am going to need soon a
method to determine if a block of time intersects with another. Specifically I
will need to do this in an SQL query. I suppose the best way would be to store
all dates in julian format, then have a query that, given
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.
Sorry about
Hi Bob,
Depending on your requirements, your tests might ned to be = and =. Also,
SQL has a BETWEEN operator that would make your code a little more
readable:
SELECT * FROM xyz WHERE startDate BETWEEN savedStartDate AND
savedEndDate
I don't think you need to store your dates in julian
Ah! Very useful thank you!
Bob
On Jul 20, 2011, at 10:50 AM, Pete wrote:
Hi Bob,
Depending on your requirements, your tests might ned to be = and =. Also,
SQL has a BETWEEN operator that would make your code a little more
readable:
SELECT * FROM xyz WHERE startDate BETWEEN
On Wed, Jul 20, 2011 at 1:06 PM, Ken Ray wrote:
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
I wouldn't rely on the send in time structure to actually fire every second.
It's going to slip over time as the computer takes periodic spikes of use.
If you want New Years Eve accuracy of the final countdown, you should
probably re-calculate the delta based on the current time continuously.
Or with the other features you mentioned:
on mouseup -- start 1 hour timer button
get the seconds
put it into now
convert now to internet date
put now into fld 1 -- display the current time
add 3600 to it -- one hour from now
set the targetTime of me to it
convert it to
Recently, Nonsanity wrote:
I wouldn't rely on the send in time structure to actually fire every second.
It's going to slip over time as the computer takes periodic spikes of use.
If you want New Years Eve accuracy of the final countdown, you should
probably re-calculate the delta based on the
On Wed, Jul 20, 2011 at 6:20 PM, Scott Rossi wrote:
Recently, Nonsanity wrote:
I wouldn't rely on the send in time structure to actually fire every
second.
It's going to slip over time as the computer takes periodic spikes of
use.
If you want New Years Eve accuracy of the final
The variety of flavors in script methods to achieve a countdown timer are
obviously many. The first place I looked for such was in revOnline (user
samples). Would those of you in this thread that contributed a version of a
solution (Ken, Chris, James, others) be ok with me compiling these
I know I can convert the time to seconds, do the math, split it up into
HH:MM:SS, and repeat a send myCounter in 1 sec to update a countdown timer
field, but before I begin chiseling on a new square wheel, is there a better
(shorter) way?
˜Roger
___
Hi.
Shorter? It already can be pretty short. MUCH shorter? Where's Colin?
Craig Newman
-Original Message-
From: Roger Eller roger.e.el...@sealedair.com
To: How to use LiveCode use-livecode@lists.runrev.com
Sent: Tue, Jul 19, 2011 5:36 pm
Subject: Countdown HH:MM:SS
I know I can
Lookup the convert function... dateAndTime and look at the format
dateItems. That probably has what you care about.
HTH,
Jeff M.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
18 matches
Mail list logo