I iterate over all the events in iCal to get only today's events, but I don't think this is efficient. Is there a function/method to get only today's events?
tell application "iCal"
tell calendar "Lotus Notes"
set today to (current date)
set this_year to year of today
set this_month to month of today
set this_day to day of today
repeat with c in every event
set d to start date of c
set the_year to year of d
set the_month to month of d
set the_day to day of d
if (the_year = this_year) and (the_month = this_month) and (the_day = this_day) then
show c
end if
end repeat
end tell
end tell
Try this:
set {year:y, month:m, day:d} to current date
set str to (m as string) & " " & (d as string) & " " & (y as string)
set today to date str
set tomorrow to today + 60 * 60 * 24
tell application "iCal"
tell calendar "Lotus Notes"
set curr to every event whose start date is greater than or equal to today ¬
and start date is less than or equal to tomorrow
end tell
end tell
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With