At 13:48 Uhr -0400 24.09.2002, <[EMAIL PROTECTED]> wrote:
>I don't need to launch Director.
>The projector is going to already be open and I want to trigger a movie to
>play at a specified time in seconds- I found a script that converts the time
>and uses an IfElseThen statement to play two movies, but I thought that there
>had to be be an easier way.
>
>I want to play the movie at say 3:25:31.
3:25:31 = 31 seconds + (25 * 60) seconds + (3 * 60 * 60) seconds =
12331 seconds
on startmovie
secondsToLaunch = (3 * 60 * 60) + (25 * 60) + 31 -- 3:25:31
secondsNow = (the systemdate).seconds
timeoutperiod = secondsToLaunch - secondsNow
if timeoutperiod < 0 then timeoutperiod = (24 * 60 * 60) + timeoutperiod
to = timeout("LaunchTimeOut").new(timeoutperiod, #mLaunch)
end
on mLaunch
timeout("LaunchTimeOut").period = (24 * 60 * 60) -- come again next day
-- do whatever you want here
end
Off the top of my head, I didn't try it, but it might work similar like this.
be aware, that this is 3 am, if you want 3 pm just add (12 * 60)
seconds or (15 * 60 * 60) + (25 * 60) + 31
On a sidenote: I still don't understand why the anglo americans don't
make this *simple* mathematical distinction between 3 am and 3 pm. it
is so much easier with 3.00 and 15.00.
--
|||
a�ex
--
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]