Hi has,
I have a long script that I wrote under 10.5 that still works properly. It contains code very similar to yours, and moves data from Excel workbooks into AddressBook. I'll include only a snippit:
if ThePerson = 0 then --Start a record in the AB for a new person
tell application "Address Book"
set ThePerson to make new person
set IndividualID to id of ThePerson
end tell
set EXPerson to {ABPersonName:MyItem, Ident:IndividualID}
set end of ABFullNames to EXPerson
set NewPerson to "True" -- Flag indicating that this is a new person.
end if --Start a record in the AB for a new person
EXPerson is used in accessing a workbook to obtain more data about the person, and ABFullNames is used in keeping track of the AddressBook entry we're creating. For purposes of this discussion, they can booth be ignored.
Hope this helps.
Bob.
Is it just me, or are Address Book's 'make' and 'delete' commands broken on 10.6? For example:
tell application "Address Book"
make new person at end of people with properties {first name:"John", last name:"Doe"}
end tell
returns a reference, but nothing shows in the GUI and next time AB launches AppleScript can't find it either.
I know being buggy as anthills is a longstanding tradition amongst scriptable Apple applications, but I'm semi-confident these commands used to work in older OS versions. Can anyone shed some light?
Thanks,
has