Contact Group Sync AppleScript no longer working with 10.8.1 Mountain Lion

Discussion in 'Mac Programming' started by hughesdc, Aug 28, 2012.

  1. hughesdc macrumors newbie

    Joined:
    Dec 29, 2007
    #1
    I have an AppleScript that helps keep my Contacts up to date in each group. The smart groups on my Mac organized my contacts, but since smart groups are not synced with my iphone and iPad, I created this script to sync the smart groups with the regular groups in my Contacts on my Mac and then they are synced through iCloud to my other devices.

    The AppleScript recently stop working and I keep getting this error: Contacts got an error: You can only add a person to a group.

    Anyone have any suggestions?

    tell application "Contacts"
    repeat with the_person in every person in group "SFocus"
    add the_person to group "Focus"
    end repeat
    repeat with the_person in every person in group "SWhole Team"
    add the_person to group "Whole Team"
    end repeat
    save
    quit
    end tell
     
  2. hughesdc thread starter macrumors newbie

    Joined:
    Dec 29, 2007
    #2
    Solution

    I figured out the problem. I had to sets of contact in my Contact app. Those contacts "On My Mac" and those on iCloud. I deleted all contacts on my Mac and the script works great now (again).
     

Share This Page