Fixed-time timers problem-help!

Dar Scott dsc at
Sat May 10 16:25:06 EDT 2003

On Saturday, May 10, 2003, at 02:27 PM, Bryan McCormick wrote:

> Then I need the stack to send out a request for data every half hour 
> through a simple script which is working fine, so all we need is the 
> timer. So that is on the half-hour and hour as follows:
> 9, 9:30,10, 10:30, ... all the way to 4PM.
> Now, the problem is "send" works great in cases where you need to 
> "poll" on a regular basis or for event contro where you don't want to 
> use idlel. However I don't  need that at all. Ideally I would want to 
> create 13 messages (13 half-hour intervals with set times) to start 
> the script.

Cool!  I have used that approach, but not for specific times and for 
much shorter times.

I think the way to do what you're asking is to "convert" the date/time 
you need to seconds and subtract the current seconds.  Send in that 
many seconds.  You can make a general handler to do that.

However, the every-minute poll looking at the time will not take that 
much overhead and might have some advantages.  It might be able to 
handle the computer rebooting or the computer left on overnight.  There 
might be other ways in which it is more robust, such as when the time 
gets corrected.

Dar Scott

More information about the use-livecode mailing list