AW: newbie video player questions

Klaus Major klaus at major-k.de
Fri Jun 8 09:49:34 EDT 2007


Hi Eddie,

> hi eric, thanks (wow, this is a great list)
> this looks more complicated then I hoped it would be. 

:-D

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?

OK, here is the EASY NEW YORK DJ "Aufulitch" LIVE REMIX version ;-)

on opensthecorrectstackaccordingtothecurrentdaytime
## if you dont not want to mess with AM and PM in the time,
## I recommend to switch to 24 hour format before we start
  set the twelvehourtime to false

  put the time into tTime
  ## tTime is now something like 14:32
  ## Now we extract the hours from tTime
   set the itemdelimiter to ":"
   put item 1 of tTime into tHour

   ## Now we check tHour and act accordingly
   ## we should check a RANGE of hours to be correct:
   if tHour >= 0 AND tHour < 12 then
   ## From midnight to early day...
      go stack "Morning stack"
   end if

   ## Now check for aternoon...
   if tHour >= 12 AND tHour < 18 then
     go stack "Afternoon stack"
   end if

   ## Now thelast option: evening to midnicht...
   if tHour >= 6 AND tHour < 24 then
     go stack "Evening stack"
   end if
end opensthecorrectstackaccordingtothecurrentdaytime

OK the handler name is incredible :-), but the rest of the
script should be easier to understand.

Please look up all unknown terms in the dictionary.

Hope that helps.

> 
> 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
>>   -----
>>   HEAVY STUFF HERE... 8-)
> ...
>> ...
>> Best regards from Paris,
>> Eric Chatonet.

Best from germany

Klaus Major



More information about the use-livecode mailing list