Hi,
I just got a new phone, but I got some problems getting all my contacts from the old one. I was able to get them into addressbook, but the formatting is not optimal.
I made a script that merges the doubles (eg "Leonardo Di caprio" and "Leonardo Di caprio1")
The only problem now is all the names are in the last name field (eg:
FirstName: "", LastName: "Leonardo Di caprio")
Can someone help me with a script that would split the lastname at the first space " " and put the first part in the firstname field
(eg:FirstName: "Leonardo", LastName: "Di caprio")
I cant find how to do it
I got this far... (I am not really pro at applescript yet
)
Thanks a lot!!
Tim
I just got a new phone, but I got some problems getting all my contacts from the old one. I was able to get them into addressbook, but the formatting is not optimal.
I made a script that merges the doubles (eg "Leonardo Di caprio" and "Leonardo Di caprio1")
The only problem now is all the names are in the last name field (eg:
FirstName: "", LastName: "Leonardo Di caprio")
Can someone help me with a script that would split the lastname at the first space " " and put the first part in the firstname field
(eg:FirstName: "Leonardo", LastName: "Di caprio")
I cant find how to do it
I got this far... (I am not really pro at applescript yet
Code:
tell application "Address Book"
set peopleToChange to people whose (name) contains " "
repeat with thePerson in peopleToChange
set theName to the name of thePerson
...
end repeat
save
end tell
Tim