how to make things happen at specific times

Sarah Reichelt sarah.reichelt at
Wed Apr 8 17:41:26 EDT 2009

> function getNextDueTime
>  get the date && "4:00 PM"
>  convert it to dateitems
>  add 1 to item 3 of it
>  convert it to seconds
>  return it - the seconds
> end getNextDueTime

Don't forget to allow for times between 4 pm and midnight.
Using this script would queue a message in a negative number of
seconds which would either never happen, or happen as soon as possible
and keep happening.
I have some heavily tested scripts for this which I can post later if
people are interested.

One caveat about pending messages Craig: they are not guaranteed to
happen exactly when scheduled. They will happen as soon as Rev is not
busy doing something else. In normal use, this is good enough, but it
means that you cannot rely on them for exact timings.


More information about the use-livecode mailing list