here is the CLOCKFACE script...coded in 3 MINUTES...17 LINES of CODE

Bill bill at bluewatermaritime.com
Tue May 31 09:33:53 EDT 2005


I like that "split" concept. I am always setting itemdelimiter to odd
characters and then depending on it to reset itself and sometimes getting
caught. 


On 5/31/05 12:55 AM, "Geoff Canyon" <geoff at runrev.com> wrote:

> Darn, forgot one more thing. Instead of setting the itemDelimiter,
> using the split command allows a cleaner T[1] syntax instead of item
> 1 of T. It is probably a bit faster as well.
> 
> New script:
> 
> on openCard
>    setTime
> end openCard
> 
> local sHourAngle -- the angle for the hour hand
> local sMinuteAngle -- the angle for the minute hand
> 
> on setTime
>    put word 1 of the long time into T
>    put T && the long seconds into fld "time"
>    split T using ":"
>    get 90 - (30 * T[1]) - trunc(T[2] / 2)
>    if it is not sHourAngle then
>      put it into sHourAngle
>      set the startangle of grc "hour" to sHourAngle
>    end if
>    get 90 - (6 * T[2]) - trunc(T[3] / 10)
>    if it is not sMinuteAngle then
>      put it into sMinuteAngle
>      set the startangle of grc "minute" to sMinuteAngle
>    end if
>    set the startangle of grc "second" to 90 - (6 * T[3])
>    send "setTime" to me in (1 - (the long seconds mod 1)) seconds
> end setTime
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

            |    |    |
           )_)  )_)  )_)
          )___))___))___)\
         )____)____)_____)\\
       _____|____|____|____\\\__
-------\                   /--------- http://www.bluewatermaritime.com
 ^^^^^ ^^^^^^^^^^^^^^^^^^^^^
  ^^^^      ^^^^     ^^^    ^^
       ^^^^      ^^^

24 hour cell: (787) 378-6190
fax: (787) 809-8426

Blue Water Maritime
P.O. Box 91
Puerto Real, PR 00740





More information about the use-livecode mailing list