Hi Nigel,
Thank you for posting the two AppleScripts. I really appreciate the effort that you’ve expended to create them. My gratitude. Interestingly enough, after I saw your first script posting, the light bulb turned on and I thought that I could open the xxx.ics files and modify them with the simple replace command. When I did open the file, I discovered that the task required considerably more work than just simple replacements. However, we’re both on the same right track by focusing the .ics file rather than on iCal.
I spent a large chuck of yesterday using the second AppleScript. I have three CPO calendar files that I want to transfer to iCal.
The first file contains 282 ToDo items plus four events that I created yesterday for testing purposes.
The second file contains 550 ToDo items.
The third file contains 21,000 ToDo items.
I have been using your second script on only the first small file since I can review the results quickly.
By the way, I am using a spare iMac G5 that the owner is loaning to me indefinitely. I backup my iMac G4 (my primary computer) each night to a Firewire external hard drive using SuperDuper!. For my iCal endeavors, I disconnect the backup drive from the G4, connect it to the G5, then clone it to the G5, then disconnect it from the G5. In this way, I can make mistakes, or I can reestablish a baseline virgin configuration on the G5 at will, without affecting my primary Mac.
Here are my observations thus far:
1: All of my ToDo items in Chronos Personal Organizer span only a single day. This applies to all three calendar files and all ToDo items (282, 550, 21,000). However, after performing all of the conversions (CPO to CSOHOO, CSOHOO to iCal, iCal ToDo to iCal Event) iCal displays the newly created Event items as spanning two days in the monthly calendar view.
When I open the final “.ics” file (tfi.ics, 282 Event items that the script converted from 282 previous ToDo items, plus four Events that I created yesterday as an aid in troubleshooting) I notice that the newly created Event records contain an additional “DTSTART;VALUE=DATE:YYYYMMDD” entry whose value is identical to the preceding “DTSTART;VALUE=DATE:YYYYMMDD” entry. Also, each of these records contain a “DTEND;VALUE=DATE:YYYYMMDD” entry that is incremented by two days over the “DTSTART” value. This confuses me since the newly created Event items only span two days on the iCal month view calendar, and since when I click on these Event items the description contains two contiguous days for “from” and “to”, not three. For example, the tfi.ics file contains the following data for the Event “Paint guard rail”:
DTSTART;VALUE=DATE:19941126
DTSTART;VALUE=DATE:19941126
DTSTART;VALUE=DATE:19941128
However the iCal Event summary contains the following data:
all-day checked
from 1994/11/26
to 1994/11/27
I checked the first tfi.ics file that had not been modified by your script. It contained the following data:
DTSTART;VALUE=DATE:19941126
DUE;VALUE=DATE:19941126
COMPLETED:19941126T050000Z
2: I examined the records in the initial unmodified tfi.ics file and the final script-modified tfi.ics file. As I said, I created four Events yesterday in this fourteen year old calendar file to help me to troubleshoot, if necessary. It came in handy. Here is what I found:
Comparison of an “Event” item before and after modification by the script.
<<Original "Event" in the unmodified tfi.ics file.>>
BEGIN:VEVENT
DTSTAMP:20080525T133157Z
UID:B2168911-98B2-4E92-86EC-EFBB1F9DB62D\:PGCalendarEvent
SEQUENCE:1
SUMMARY:This is a test of EVENT on 1994-05-29
DTSTART;VALUE=DATE:19941129
DTEND;VALUE=DATE:19941130
PRIORITY:1
END:VEVENT
<<Original "Event" in the script-modified tfi.ics file.>>
BEGIN:VEVENT
DTSTAMP:20080525T133157Z
UID:B2168911-98B2-4E92-86EC-EFBB1F9DB62D\:PGCalendarEvent
SEQUENCE:1
SUMMARY:This is a test of EVENT on 1994-05-29
DTSTART;VALUE=DATE:19941129
DTEND;VALUE=DATE:19941130
PRIORITY:1
END:VEVENT
<<The script correctly did not modify this Event record.>>
Comparison of a “ToDo” item before and after modification by the script.
<<Original "ToDo" in the unmodified tfi.ics file.>>
BEGIN:VTODO
DTSTAMP:20080525T133157Z
UID:973D57D1-6B1F-4C96-9558-6B0F7F4D53F4\:PGCalendarTask
SEQUENCE:1
SUMMARY:Dig footings yesterday
DESCRIPTION:To-Do
DTSTART;VALUE=DATE:19940401
DUE;VALUE=DATE:19940401
COMPLETED:19940401T050000Z
STATUS:COMPLETED
PRIORITY:1
END:VTODO
<<Original "ToDo" in the script-modified tfi.ics file.>>
BEGIN:VEVENT
DTSTAMP:20080525T133157Z
UID:973D57D1-6B1F-4C96-9558-6B0F7F4D53F4\:PGCalendarTask
SEQUENCE:1
SUMMARY:Dig footings yesterday
DESCRIPTION:To-Do
DTSTART;VALUE=DATE:19940401
PRIORITY:1
DTSTART;VALUE=DATE:19940401
DTEND;VALUE=DATE:19940403
END:VEVENT
<<Notice that the "Priority" entry occupies a different
position within the second record.>>
<<"Status:Completed" is not present in the second file.>>
<<"Completed:YYYYMMDDTHHMMSSZ" is replaced with
"DTEND;VALUE=DATE:YYYYMMDD" in the second record.>>
<<"DTSTART;VALUE=DATE:YYYYMMDD" appears twice in
the record in the second file.>>
<<By the way, is the entry "DESCRIPTION:" synonymous
with "Notes"? The word "To-Do" appears in the notes
section of CSOHOO, and also in what appears to be a
notes section of iCal.>>
Finally, in the script-modified file tfi.ics, the VEVENT records that the script created from the previous VTODO records do not follow the protocol of the VEVENT records that the script did not touch. Should they?
I have reviewed your code in the second script, but alas, I am about as lost as a ball in tall grass. I hope that the observations that I have provided to you will help. Please feel free to contact me with any questions or issues.
Best wishes.
Regards,
Kurt R. Todoroff