AW: newbie video player questions

eddie d nieuwsgroeps at wanadoo.nl
Fri Jun 8 09:26:59 EDT 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?


eddie

>
>
>>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 
>>videoplayer
>>any idea on how to do this?
>>
>>eddie d
>
>The way to master this is to work with seconds and a pending message:
>
>on DisplayRightStack
>   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
>end DisplayRightStack
>
>See seconds, convert, pendingMessages, send and related topics in the docs.
>
>Best regards from Paris,
>Eric Chatonet.
>





More information about the use-livecode mailing list