Re: Scripting ical
Re: Scripting ical
- Subject: Re: Scripting ical
- From: Andrew Oliver <email@hidden>
- Date: Mon, 17 Feb 2003 00:28:44 -0800
On 2/16/03 11:25 PM, "Nicholas Orr" <email@hidden> wrote:
>
I'm trying to get out of it times that I then import into a database.
>
I've found other people's ideas (including an ical to sidekick file)
>
that I got some ideas from.
>
>
What I can't do is only export events from a particular date range.
The following code will get all events that fall between the two dates
listed.
tell application "iCal"
set start_date to date "1/1/2003"
set end_date to date "28/2/2003"
set theEvents to every event of calendar 1 whose start date is greater
than start_date and end date is less than end_date
end tell
It should be easy to extract the relevant data from this and export it
somewhere.
What this does not do, however, is catch recurring events - their start and
end dates ONLY reflect the first instance, not the recurring events.
>
Firstly how do you set a variable to a date:
>
>
set end_date to " 18/1/ 2003" as date
As you can see from above, try:
Set end_date to date "18/1/2002"
Instead. AppleScript will be able to create a date object in this way, where
it can't coerce the string into a date. I have to admit I don't fully
understand the reasoning why - I've just got used to doing it this way.
Andrew
:)
_______________________________________________
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.