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

Geoff Canyon geoff at runrev.com
Tue Jun 7 00:40:50 EDT 2005


I've posted the new revision:

on openCard
   setTime
end openCard

on setTime
   put word 1 of the long time into T --8:13:15
   put T & char 2 to 5 of (the long seconds mod 1) into fld "Time"
   split T using ":"
   get (450 - (30 * T[1]) - (T[2] div 2)) mod 360
   if (the angle of grc "Hour") <> it then set the angle of grc  
"Hour" to it
   get (450 - (6 * T[2]) - (T[3] div 10)) mod 360
   if (the angle of grc "Minute") <> it then set the angle of grc  
"Minute" to it
   set the angle of grc "Second" to 450 - (6 * T[3])
   send "setTime" to me in 1 - (the long seconds mod 1) seconds
end setTime

On Jun 6, 2005, at 9:38 AM, Dennis Brown wrote:

> Good catch.
> As was pointed out before, trunc(T[2] / 2) can be simplified to (T 
> [2] div 2)
>



More information about the use-livecode mailing list