"iCal got a
"iCal got an error: Can't make event of calendar \"Work\" whose start date ≤ date \"Thursday, September 29, 2005\" and end date ≥ date \"Thursday, September 29, 2005\" into type reference."
On Sep 29, 2005, at 1:45 PM, chet kelley wrote:
if today is "Saturday" or "Sunday"
Well, first of all, today would be the full date, expressed as a string. E.g., "Thursday, September 29, 2005"
Secondly, you're casting "saturday" and "sunday" as booleans, so that comparison will always fail.
whose start date ≤ today
Thirdly, you're trying to compare a date to a string.
Try this:
set now to date string of (current date) set today to weekday of (current date) tell application "iCal" if (today is Saturday) or (date now is Thursday) or (exists (event in calendar "Travel" whose start date ≤ date now and end date ≥ date now) and (event in calendar "Federal Holidays" whose start date ≤ date now and end date ≥ date now)) then display dialog "have fun sleeping in" else tell application "iTunes" to play track "Hells Bells" end if end tell
-- Michelle
-- Help, I've caught a cult, and can't get out!
|