This hint is for Tiger only -- you'll have to modify it on Leopard or Snow Leopard, because of changes to iCal's folder structure.
I've recently switched to Mozilla Sunbird because it looks a lot nicer and runs faster than iCal, although it can't directly use iSync, so I can't synchronize the calendars on my laptop with my phone. By looking around in iCal's folder, I found out that you can copy a calendar file (.ics) from Sunbird into iCal and use that to synchronize with iSync. You can then load that synchronized calendar back into Sunbird.
There's a lot of mucking about, but it's well worth it :).
- Export a copy of an iCal calendar and load that into Sunbird. In this case, I'm using a calendar named Work.ics as an example, and I've exported it to my user's Documents folder.
- Find out where the corresponding iCal copy of that calendar lives by going into your user's Library » Application Support » iCal » Sources folder. There will be a few folders in there with cryptic names like 614ED0EF-9429-4241-B8F7-26DA48E737EA.calendar; you can find the correct calendar by looking it up in the Info.plist file in that folder. Take note of this, and edit the script below to reflect the correct folder. The calendar data is in the file corestorage.ics.
- The following script copies the Sunbird calendar back to iCal for syncing, then calls iSync to sync with the phone over a Bluetooth connection. The script loads iCal for a second to get things nice and tidy before copying the synced calendar back to the Sunbird copy.
The script assumes your username is joe, your Sunbird calendar is located in the Documents folder, and the corresponding iCal calendar is in the 614ED0EF-9429-4241-B8F7-26DA48E737EA.calendar folder. Please modify accordingly before running.
0#!/bin/bash # Copies Sunbird calendars (Work.ics and Personal.ics) to iCal for iSync with phone # Syncs everything with phone, then copy back to Sunbird # Make sure Sunbird is restarted! # Backup existing calendars cp /Users/joe/Documents/Work.ics /Users/joe/Documents/Work.ics.bak # Copy Sunbird calendar to iCal, ready for syncing cp /Users/joe/Documents/Work.ics "/Users/joe/Library/Application Support/iCal/Sources/614ED0EF-9429-4241-B8F7-26DA48E737EA.calendar/corestorage.ics" # Syncs calendar with phone /usr/bin/osascript /Users/joe/bin/autosync.scpt # Runs iCal for a second to set sync /usr/bin/osascript /Users/joe/bin/ical_start_stop.scpt # Copies back synced iCal calendar for Sunbird usage cp "/Users/joe/Library/Application Support/iCal/Sources/614ED0EF-9429-4241-B8F7-26DA48E737EA.calendar/corestorage.ics" /Users/joe/Documents/Work.ics
The above script references ical_start_stop.scpt, which is an AppleScript file located in the bin folder in my home folder. It contains the following code:tell application "iCal" to activate tell application "iCal" to quit
The above script also references autosync.scpt, which is a script taken from this hint, which I copied and saved in Script Editor in the bin folder in my user's home folder.
[robg adds: I haven't tested this one.]

