Le 6 sept. 2009 à 20:53:11, Deivy Marck Petrescu a écrit :
On Sep 6, 2009, at 13:28, Yvan KOENIG wrote:
set wakeTime to "6:01"
set WakeUpTime to short date string of (current date)
set WakeUpTime to date (WakeUpTime & space & wakeTime)
display dialog (time of WakeUpTime) as text
Try this instead:
set wakeTime to "6:01"
set WakeUpTime to short date string of (current date)
set WakeUpTime to date (WakeUpTime & space & wakeTime)
set pad to "0"
set h to (time of WakeUpTime) div (1 * hours)
if h < 10 then set h to pad & h
set m to ((time of WakeUpTime) mod (1 * hours)) div (1 * minutes)
if m < 10 then set m to pad & m
set s to (time of WakeUpTime) mod (1 * hours) mod (1 * minutes)
if s < 10 then set s to pad & s
display dialog (h & ":" & m & ":" & s)
Deivy Petrescu