Re: Set hours of date = stack overflow error on 10.3.9?
Re: Set hours of date = stack overflow error on 10.3.9?
- Subject: Re: Set hours of date = stack overflow error on 10.3.9?
- From: Yvan KOENIG <email@hidden>
- Date: Thu, 15 Dec 2005 18:34:44 +0100
Le 15 déc. 2005, à 16:14, Loren Ryter a écrit :
On 12/15/05 6:05 AM, "Yvan KOENIG" <email@hidden> wrote:
Le 15 déc. 2005, à 4:14, Loren Ryter a écrit :
Puzzle:
A 10.3.9 user of Cast Away keeps getting a stack overflow error. I
tracked
down the problem to the following bit of code:
---------
property wakeup : current date
property bedtime : current date
set hours of wakeup to 8
set minutes of wakeup to 0
set hours of bedtime to 23
set minutes of bedtime to 0
set result to {bedtime, wakeup}
-------------------
It seems that a better code may be:
property wakeup : current date
property bedtime : current date
set time of wakeup to (8 * hours) + (0 * minutes) + 0
set time of bedtime to (23 * hours) + (0 * minutes) + 0
set result to {bedtime, wakeup}
Hello
I will respond to two post in a single one.
- 1 - to Michelle Steiner:
I perfectly knew that the result of "set time of wakeup to (8 * hours)"
would be the same that the long formula.
I wished to pass a complete one allowing to set the minutes and the
seconds.
- 2 - to Loren Ryter
to get Hours, Minutes and seconds, I uses this code
set curdate to current date
set curTime to time of curdate
set h to curTime div hours
set minutes_secondes to curTime - (h * hours)
set m to minutes_secondes div minutes
set s to (minutes_secondes - (m * minutes))
display dialog "" & h & "-" & m & "-" & s
Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden