copying address book info

what is the most efficient way to copy all (or most) of contact info of one person to another in Address book using applescript?

For example, to copy the address I tried


tell application "address book"
set address of person "X" to address of person "Y"
end tell


this runs with no errors but produces no result. same with phones. i can go through each individual address field but it’s a major pain. is there a quicker way?

Hi,

wouldn’t it be easier to duplicate the entry and change just the name?

let me elaborate. I need to do it to a large number of address book entries for people working for the same company. I wanted to use the address and the phone of the company and add it to all of those AB entries.

then create a group with the specified people,
and add the information with a repeat loop by creating new address / phone entries

yes, I can do that. i was just wondering if it’s possible to copy address book entries directly using apple script.

I’m not sure.

The syntax set address to. can’t work, because an address is an element and elements are not settable.
It might work to move a single address to an insertion point like .after end of addresses,
but unfortunately every application behaves different

ok, thanks. what you suggested earlier does work so this isn’t a big deal.