• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How can I speed up creation of events in iCal?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I speed up creation of events in iCal?


  • Subject: How can I speed up creation of events in iCal?
  • From: Christian Boyce <email@hidden>
  • Date: Sat, 1 May 2010 13:57:48 -0700

I have a big list where every item in the list is itself a list, like so:

{{title, start date, end date, category}, {title, start date, end date, category}, {title, start date, end date, category}} (etc.)

I want to populate an empty iCal calendar with this information. 

I broke the list of events down by category, so now I have 18 different lists, each with events that belong together. 

Here's what I've been doing:

tell application "iCal"
   set theCalendar to make new calendar with properties {title:the_name} --the_name is the name of the category
   tell theCalendar
        repeat with j from 1 to the number of items in the_cat_events -- the_cat_events is the list holding the events
             make new event at end with properties {summary: item 1 of item j of the_cat_events, start date: item2 of item j of the_cat_events, end date; item 3 of item j of the_cat_events.
        end repeat
    end tell
end tell

it works, but it's slow. My list of events is 13,000 events long. For 100 items or so it's pretty quick but with this many items it's taking forever. I have a feeling that it actually slows down the longer it runs. 

It's taking hours. Actually, overnight. Somehow I think there's a more efficient way. I would appreciate your suggestions. Thank you.

Running on 10.6.3, iCal 4.0.2.

Christian Boyce
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: AppleScript-Users Digest, Vol 7, Issue 225
  • Next by Date: Re: Simple multiplication going bizarre
  • Previous by thread: Re: AppleScript-Users Digest, Vol 7, Issue 225
  • Next by thread: Re: Simple multiplication going bizarre
  • Index(es):
    • Date
    • Thread