Re: Applescript can't tell time?
Re: Applescript can't tell time?
- Subject: Re: Applescript can't tell time?
- From: Walter Ian Kaye <email@hidden>
- Date: Tue, 3 Feb 2004 10:26:43 -0800
At 10:01a -0700 02/03/2004, Robert Poland didst inscribe upon an
electronic papyrus:
Why doesn't this script work?
set nowDate to (current date)
set nowTime to "" & time string of (nowDate)
set bedTime to "8:59.00 PM" as text --> "8:59.00 PM"
set nowTime to nowTime as text --> "9:57:26 AM"
if (nowTime is less than bedTime) then
set x to 1
else
set x to 2
end if
x --> 2
Is this copy/pasted from your script? You have a period instead of a colon.
Also, you are only comparing text strings, not time values, so 1:00
PM will appear to be less than 12:00 PM.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.