Smart Group that contains Cards with "Company" Marked
Any way I can do this?
Bryan Schmiedeler
2.4GHz Intel Core 2 Duo, Mac OS X (10.5.2)
2.4GHz Intel Core 2 Duo, Mac OS X (10.5.2)
property groupName : "Business"
tell application "Address Book"
if (name of groups as list) does not contain groupName then
make new group at end of groups with properties {name:groupName}
end if
repeat with singlePerson in people
if company of singlePerson is true then
if (people of group groupName as list) does not contain (singlePerson as list) then
make new person at end of group groupName with data singlePerson
end if
end if
end repeat
save addressbook
end tell
property groupName : "Business"
tell application "Address Book"
if (name of groups as list) does not contain groupName then
make new group at end of groups with properties {name:groupName}
end if
repeat with singlePerson in people
if company of singlePerson is true then
if (people of group groupName as list) does not contain (singlePerson as list) then
make new person at end of group groupName with data singlePerson
end if
end if
end repeat
save addressbook
end tell
Smart Group that contains Cards with "Company" Marked