The script below fails on the "set thelabel to label of phone" with
the error "can't get label of phone". How do I get the value of the
label of the phone entries? Thanks.
tell application "Address Book"
make new group with properties {name:"pharmacy with fax"}
repeat with eachContact in (get every person in group "Pharmacy") --
(get every person)
repeat with eachPhoneNum in (get phones of eachContact)
set thelabel to label of phone
set thevalue to value of phone
-- check to see if label contains "fax"
if thelabel contains "fax" then
add eachContact to group "pharmacy with fax"
end if
end repeat
end repeat
save addressbook
end tell