6 Replies Latest reply: Dec 31, 2013 7:48 AM by rck77
LambdaEnt Level 1 Level 1 (0 points)

I am trying to write an AppleScript to import an ICS file into a specific List. I can get Reminders to open the ICS file, but then it opens a dialog asking the user to specify the desintation list.


I cannot figure out from the Dictionary what is the proper syntax to specify the destination list without user intervention.


Thank you!

OS X Mountain Lion
  • Pierre L. Level 5 Level 5 (4,140 points)

    Does everything work properly if you import the ICS file manually?

  • LambdaEnt Level 1 Level 1 (0 points)

    Yes. Why would you ask that question? I never said anything was wrong. Please re-read my question.

  • Pierre L. Level 5 Level 5 (4,140 points)

    The fact is that Reminders doesn't work well at all on my computer. Though maybe I just don't know how to use it properly.


    That being said, may I suggest the following workaround, using GUI Scripting:


    set theFile to POSIX file "/POSIX/path/to/your/ICS/file"

    set theListName to "Some name"


    tell application "Reminders"


        delay 1

        open theFile

        delay 1


        tell application "System Events"

            tell process "Reminders"

                tell window "Add reminders"

                    click pop up button 1

                    keystroke theListName & return & return

                end tell

            end tell

        end tell

    end tell


    Message was edited by: Pierre L.

  • aTm Level 1 Level 1 (100 points)

    I can't get the stupid thing (Reminders) to import anything and its driving me crazy! I have a correctly formatted .ics file I've tried to import several times... it display the dialog asking which list to import into ... I choose one ... then look at the list to see if its there.. and NEGATIVE. I haven't been able to get any file to import. I've tried like 10-15 different ones.


    I think Reminders, Notes, Calendar, and Contacts have a ways to come with respect to reliability and overall stability.


    ( I have  examples for each but down feel like writing about them now.)

  • Kiwi Graham Level 4 Level 4 (1,850 points)

    Yeah - very frustrated by Reminders at the moment.


    Had several iCloud lists deleted by mistake so I'm trying to restore from a Time Machine backup.


    Problem with iCloud ones is that iCloud sync thinks it knows best so even if the whole ~/Library/Calendars folder is restored the sync operation re-removes the restored reminder lists.


    When trying to manually add the restored ics files into the Reminders app it only occasionally works and only when importing a single file. One can drag the ics files onto either Calendar or Reminders and the Reminders app will ask for which list and pretend to import but doesn't actually do it.

  • rck77 Level 1 Level 1 (0 points)

    I had a similar question, on the iMac.


    A nice technique to import a list from a plain text file into the Reminders app on Mac OS X:


    Applescript from: http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminder s/