• 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
Anybody to add only if absent to a group in address book?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Anybody to add only if absent to a group in address book?


  • Subject: Anybody to add only if absent to a group in address book?
  • From: David Crowe <email@hidden>
  • Date: Sat, 9 Dec 2006 13:31:10 -0700

Title: Anybody to add only if absent to a group in address book?
Robert;

This little function should help you...


TestGroup("David Crowe", "Family") -->

on TestGroup(FullName, GroupName)
      
tell application "Address Book"
                set p to first person whose name is FullName
           
set theGroupList to name of every group of p --> {"Family"}
                return theGroupList contains GroupName --> true
        end tell
end TestGroup


I think the basic idea is fairly obvious, you get the list of groups for a person and, if the new group is already in the list, you simply don't add.

I wasn't exactly sure what you wanted to do, but I think this should help you.

- David Crowe
 _______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Anybody to add only if absent to a group in address book?
  • Next by Date: Re: Get/Set text selected in a Mail.app message
  • Previous by thread: Re: Anybody to add only if absent to a group in address book?
  • Next by thread: attachments to Filemaker container
  • Index(es):
    • Date
    • Thread