Anybody to add only if absent to a group in address book?
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