Re: Applescript can't tell time?
Re: Applescript can't tell time?
- Subject: Re: Applescript can't tell time?
- From: Michelle Steiner <email@hidden>
- Date: Tue, 3 Feb 2004 10:36:00 -0700
On Feb 3, 2004, at 10:01 AM, Robert Poland wrote:
Why doesn't this script work?
Because you're comparing strings, not dates. A string beginning with
"8" is always less than a string beginning with "9".
Try this script instead:
set nowTime to (current date)
set bedTime to date (date string of nowTime & ":8:59: PM")
if nowTime is less than bedTime then
set x to 1
else
set x to 2
end if
--
"To announce that there must be no criticism of the president, or that
we are to stand by the president right or wrong, is not only
unpatriotic and servile, but is morally treasonable to the American
public." --Teddy Roosevelt
_______________________________________________
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.