Re: Countdown HH:MM:SS

2011-07-21 Thread James Hurley
> > Message: 15 > Date: Wed, 20 Jul 2011 15:19:07 -0400 > From: Roger Eller > To: How to use LiveCode > Subject: Re: Countdown HH:MM:SS > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > On Wed, Jul 20, 2011 at 1:06 PM, Ken Ray wro

Re: Countdown HH:MM:SS

2011-07-20 Thread Ken Ray
> > 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 th

Re: Countdown HH:MM:SS

2011-07-20 Thread Roger Eller
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

Re: Countdown HH:MM:SS

2011-07-20 Thread Scott Rossi
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

Re: Countdown HH:MM:SS

2011-07-20 Thread Nonsanity
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 inte

Re: Countdown HH:MM:SS

2011-07-20 Thread Nonsanity
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. Here

Re: Countdown HH:MM:SS

2011-07-20 Thread Roger Eller
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:0

Re: Countdown HH:MM:SS

2011-07-20 Thread Bob Sneidar
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 save

Re: Countdown HH:MM:SS

2011-07-20 Thread Pete
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 fo

Re: Countdown HH:MM:SS

2011-07-20 Thread Ken Ray
> 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 tha

Re: Countdown HH:MM:SS

2011-07-20 Thread Bob Sneidar
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 s

Re: Countdown HH:MM:SS

2011-07-20 Thread James Hurley
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 tT

Re: Countdown HH:MM:SS

2011-07-20 Thread James Hurley
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 fr

Re: Countdown HH:MM:SS

2011-07-20 Thread Roger Eller
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 >

Re: Countdown HH:MM:SS

2011-07-19 Thread Ken Ray
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

Re: Countdown HH:MM:SS

2011-07-19 Thread Jeff Massung
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 y

Re: Countdown HH:MM:SS

2011-07-19 Thread dunbarx
Hi. Shorter? It already can be pretty short. MUCH shorter? Where's Colin? Craig Newman -Original Message- From: Roger Eller To: How to use LiveCode Sent: Tue, Jul 19, 2011 5:36 pm Subject: Countdown HH:MM:SS I know I can convert the time to seconds, do the math, split it up in