Hello all
I am trying to write a simple script to get last names from specific records in Address Book. If I write the id into the script:
tell application “Address Book”
last name of (person id “4579EE5F-1287-11DA-A7AB-003065C1FA46:ABPerson”)
end tell
it returns the last name
If I try to set a variable to the current found card:
tell application “Address Book”
set thisPerson to selection
last name of thisPerson
end tell
it returns the error:
“Can’t get last name of {person id "4579EE5F-1287-11DA-A7AB-003065C1FA46:ABPerson" of application "Address Book"}.”
Is this a syntax problem or am I way off base?
Thanks for your help