AW: newbie video player questions
nieuwsgroeps at wanadoo.nl
Fri Jun 8 08:26:59 CDT 2007
hi eric, thanks (wow, this is a great list)
this looks more complicated then I hoped it would be. I was hoping
you could just read the system time and have it do stuff according to
that. (like if time is < 12 go stack morning)
but I'll try this.
were do I put this, in the main stack or in each substack?
>>so now I need to figure out how to let it go to a certain substack
>>on a specific time.
>>I thought I make a subtack for 'morning' one for 'afternoon' and
>>one for 'evening' and in each stack are a number of cards with a
>>any idea on how to do this?
>The way to master this is to work with seconds and a pending message:
> local tMidnightSeconds
> put the short date into tMidnightSeconds
> convert tMidnightSeconds to seconds
> -- tDate contains the seconds from today at 0:00
> if the seconds >= tMidnightSeconds + (9*3600) then -- 9 AM
> <go stack "Morning" process>
> else if the seconds >= tMidnightSeconds + (14*3600) then -- 2 PM
> <close stack "Morning" process>
> <go stack "Afternoon" process>
> else if the seconds >= tMidnightSeconds + (20*3600) then -- 8 PM
> <close stack "Afternoon" process>
> <go stack "Evening" process>
> else if the seconds < tMidnightSeconds + (9*3600) then -- before 9 AM
> <close stack "Evening" process>
> end if
> if "DisplayRightStack" is not in the pendingMessages then
> send "DisplayRightStack" to me in 60 seconds
> end if
>See seconds, convert, pendingMessages, send and related topics in the docs.
>Best regards from Paris,
More information about the use-livecode