Re: Count Up Timer?

2021-11-02 Thread Tom Glod via use-livecode
Ok, thanks Sean, here it is in plain text for anyone who wants to use it. function TimeDisplay HowMany,DisplayHow if DisplayHow = "Duration" then //* if AppStarterStackSettings["default"]["Time Unit"] = "seconds" then return

Re: Count Up Timer?

2021-11-02 Thread Craig Newman via use-livecode
When I was very young I used to run a gadget like this on a field with styled text: on mouseUp get fld 1 repeat for each char tChar in it put numToChar(charToNum(tChar)) after accum end repeat put accum into fld 2 end mouseUp But you do not have to do all that: on mouseUp get fld

Re: Count Up Timer?

2021-11-02 Thread Sean Cole via use-livecode
Tom, It is. I would copy it into TextEdit (Plaintext), Atom or BBEdit first to strip any formatting properly, then copy paste from there to mail. :) It happens. Nothing to worry about and only a minor inconvenience. Good code, though :) Sean On Tue, 2 Nov 2021 at 17:14, Tom Glod via use-livecode

Re: Count Up Timer?

2021-11-02 Thread Tom Glod via use-livecode
Oh man ..I forgot about the formatting thing. In my client it shows up formatted with color. Does it work ok if it is pasted plain text? On Tue, Nov 2, 2021 at 12:08 PM Mark Wieder via use-livecode < use-livecode@lists.runrev.com> wrote: > On 11/2/21 8:48 AM, Craig Newman via use-livecode wrote:

Re: Count Up Timer?

2021-11-02 Thread Mark Wieder via use-livecode
On 11/2/21 8:48 AM, Craig Newman via use-livecode wrote: Mark. “... unless the person was born after 1 January 1970." Check out the thread “When was the big bang?” on the forum: https://forums.livecode.com/viewtopic.php?f=9=26619=138530=big+bang#p138530 LOL. "one bit for (the) apple." --

Re: Count Up Timer?

2021-11-02 Thread Bob Sneidar via use-livecode
And then if you want to convert to the Babalonian calendar of 360 days in a year, well that is just right out. Bob S > On Nov 2, 2021, at 08:48 , Craig Newman via use-livecode > wrote: > > Mark. > > “... unless the person was born after 1 January 1970." > > Check out the thread “When was

Re: Count Up Timer?

2021-11-02 Thread Sean Cole via use-livecode
Tidy. Took 10 seconds: -- function TimeDisplay HowMany,DisplayHow if DisplayHow = "Duration" then // if AppStarterStackSettings["default"]["Time Unit"] = "seconds" then return round(HowMany / 1000,3)

Re: Count Up Timer?

2021-11-02 Thread Craig Newman via use-livecode
Mark. “... unless the person was born after 1 January 1970." Check out the thread “When was the big bang?” on the forum: https://forums.livecode.com/viewtopic.php?f=9=26619=138530=big+bang#p138530 Craig > On Nov 2, 2021, at 11:43 AM, Mark Wieder via use-livecode > wrote: > > On 11/2/21

Re: Count Up Timer?

2021-11-02 Thread Mark Wieder via use-livecode
On 11/2/21 7:33 AM, Curry Kenworthy via use-livecode wrote: A forum is handy for searches, so a nice place to visit now and then. But I wouldn't want to live there! :D Heh. My thoughts as well. > It would take a lot of work to reformat the OP’s code example > into something workable in

Re: Count Up Timer?

2021-11-02 Thread Curry Kenworthy via use-livecode
Craig: > This is just another great example why the Forum > is so much better a venue than this list. My view is exactly opposite; I like a List s much better. A forum is handy for searches, so a nice place to visit now and then. But I wouldn't want to live there! :D > It would take a lot

Re: Count Up Timer?

2021-11-02 Thread Craig Newman via use-livecode
,0,2. Do a little subtraction > and you get 1 yr, 0 months, 15 days, 3 hours, 24 mins, 0 secs. > >> On Nov 1, 2021, at 9:45 PM, Dan Friedman via use-livecode >> wrote: >> >> Anyone ever done a count up timer? For example, if we supply the seconds >> of 160555

Re: Count Up Timer?

2021-11-01 Thread Mark Smith via use-livecode
a little subtraction and you get 1 yr, 0 months, 15 days, 3 hours, 24 mins, 0 secs. > On Nov 1, 2021, at 9:45 PM, Dan Friedman via use-livecode > wrote: > > Anyone ever done a count up timer? For example, if we supply the seconds of > 1605553200, we want to display the number

Re: Count Up Timer?

2021-11-01 Thread Tom Glod via use-livecode
on < 1 *then* *replace* "" with "00" in final_output *else* *// how many minutes?* *if* the number of characters in item 1 of next_calculation = 1 *then* *replace* "" with "0" & next_calculation in final_output *else* *replace* "" with next_calculation in final_output *end* *if* *end* *if* *end* *if* *//***

Count Up Timer?

2021-11-01 Thread Dan Friedman via use-livecode
Anyone ever done a count up timer? For example, if we supply the seconds of 1605553200, we want to display the number of years, months, days, hours, minutes and seconds since that time. For example, "How long have you been alive?". This needs to be precise – need to account for