Re: Getting info back from iCal: missing values ?
Re: Getting info back from iCal: missing values ?
- Subject: Re: Getting info back from iCal: missing values ?
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 20 Sep 2005 08:53:00 -0700
- Thread-topic: Getting info back from iCal: missing values ?
Title: Re: Getting info back from iCal: missing values ?
On 9/20/05 7:59 AM, "Paul Berkowitz" <email@hidden> wrote:
set now to (current date)
copy now to midnight
set time of midnight to 0
set tomorrow to midnight + (1 * days)
tell application "iCal"
set TodaysEvents to {}
set allCals to every calendar
repeat with aCalendar in allCals
set thisCalsEvents to get (every event of aCalendar whose start date > midnight and start date < tomorrow)
set TodaysEvents to TodaysEvents & thisCalsEvents
end repeat
TodaysEvents
end tell
Oops. That will miss events (like all day events ) starting at midnight. It needs a ≥ .Fixed here:
set now to (current date)
copy now to midnight
set time of midnight to 0
set tomorrow to midnight + (1 * days)
tell application "iCal"
set TodaysEvents to {}
set allCals to every calendar
repeat with aCalendar in allCals
set thisCalsEvents to get (every event of aCalendar whose start date ≥ midnight and start date < tomorrow)
set TodaysEvents to TodaysEvents & thisCalsEvents
end repeat
TodaysEvents
end tell
--
Paul Berkowitz
_______________________________________________
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