Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Automator to "replace" an existing iCal calendar with an ics file.

I'm trying to come up with a way to use Automator to delete an existing calendar and then import a new one (trying to avoid duplicates as I use iCal for printing my calendar) as a Folder Action for when the new ics file is created.

What I've got mostly works, except for the delete part. Here's what I've got:
- Get Specified iCal Items (appropriate calendar is chosen)
- Delete iCal Events
- New Calendar (with same name as what was just deleted)
- Find Finder Items (set to find the new .ics file)
- Open Finder Items (Default Application - to open in iCal -- asks for the iCal Calendar to add to, with the new calendar selected)
- Pause (30 seconds - to give time to respond to the above result before...
- Move to Trash (moves the ics file to the Trash - this is because if I just overwrite the ics file each time I export from the other application, the Folder Action won't activate as it doesn't recognize the modified file as affecting the folder)

The problem appears to be with the Delete iCal Events -- the action stops there. It deletes a few events, and then quits. If I run the action over and over, it eventually gets through them all, and then continues (seems to take about 5 or 6 runs). In the log, when it quits, it says:

"An error (iCal got an error: NSInternalScriptError(8)) occurred in Delete iCal Events"

Any ideas how to get around this? Or a better way to do what I'm trying to do overall?

Thanks,
Scott

G5 Dual 2Ghz; 12 AlBook; iPod 3rd Gen, Mac OS X (10.4.7)

Posted on Jul 5, 2006 3:43 PM

Reply

There are no replies.

Automator to "replace" an existing iCal calendar with an ics file.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.