On May 24, 2010, at 8:22 PM, Robert Poland wrote: As noticed by others the handler is used several times so that's why the text item delimiters were done that way.
That introduces another potential problem; if you're going to use text item delimiters in other handlers, there may be a conflict.
Also, you might think about passing all the parameters at once, so the handler is called only once, and loops within the handler.
set WakeUpTimes to {"6:31", "8:49", "7:13", "3:26"} set WakeUpTimes to my decoupe(WakeUpTimes)
on decoupe(tees) -- t = time set output to {} set AppleScript's text item delimiters to ":" repeat with t in tees set {h, m} to text items of t copy ((m as integer) + ((h as integer) * 60)) * 60 to end of output end repeat set AppleScript's text item delimiters to "" -- restore return output end decoupe
Then you can process each item of the returned list.
-- Michelle
-- Do not go out and kill Klansmen, no matter how much they deserve it. It would be funny as hell to see on the evening news how a bunch of guys wearing bright pink robes and hoods started burning triangles in their yards for a change.
|