John Hazen wrote: >Basically, I've got email messages with iCalendar (.ics) file >attachments. > >I can't seem to find the way in the iCal dictionary to make it import a >file (the "open" command thinks it's an iCal calendar, and errors out).
If you can drag-n-drop the .ics file onto iCal's icon all right then 'tell app "iCal" to open alias "path:to:file.ics"' will work as well. Seems to on iCal 2.0 (OS 10.4); can't vouch for iCal 1.x. >I've tested the import of the .ics file using the Menu in iCal, and it >understands the files perfectly. Is there some way to do this under >script control? GUI Scripting (part of System Events). It's kludgy, tedious and fragile, but if you want to manipulate a GUI application directly and its scripting interface isn't up to snuff then manipulating its GUI objects is better than nothing. Probably best to ask on one of the AppleScript forums for help there; there'll be more folks there familiar with using it. >P.S. I'd prefer to do this with python, but this is essentially an >applescript question. Sorry if it's too OT. Python has very good application scripting support: http://freespace.virgin.net/hamish.sanderson/appscript.html Alternatively, I imagine you could bypass iCal and work directly with its iCalendar files; Google for Python+iCalendar. has -- http://freespace.virgin.net/hamish.sanderson/ _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig