• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AppleScripting Contacts - cannot add a person to a group
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScripting Contacts - cannot add a person to a group


  • Subject: AppleScripting Contacts - cannot add a person to a group
  • From: John Mitchell <email@hidden>
  • Date: Sat, 02 Jun 2018 15:20:23 +1000

HI

I’m trying to create a Group in Contacts and add persons to it.

I can create the group, but I cannot add a team of persons to the group

here are some examples of my failing code

        if not (theGroupNames contains grpName) then
                #create new group
                make new group with properties {name:grpName}
        end if
OK so far

        repeat with i from 1 to teamCount
                if item i of teamABPerlist is not "" then
                        #person exists in Contacts
                        set Pid to item i of teamABPerlist
                        set theName to (item i of cnamelist & space & item i of
surnamelist)
attempt 1
                        # set group of person id Pid to group id GRPid - (I can
get the group ID successfully)
attempt 2
                        add (person whose name is theName) to group grpName
attempt 3
                        # set thePerson to (person id Pid) as specifier
                        #       set group of thePerson to group grpName
                        # add thePerson to group id GRPid as specifier

                        # save the database
                        save
etc

tia

John Mitchell

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: AppleScripting Contacts - cannot add a person to a group
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Any way to get "file pointer"?
  • Next by Date: Re: AppleScripting Contacts - cannot add a person to a group
  • Previous by thread: Re: Mysterious OSX Mail scripting problem [solved!]
  • Next by thread: Re: AppleScripting Contacts - cannot add a person to a group
  • Index(es):
    • Date
    • Thread