Parsing phone/emails in Address Book
Parsing phone/emails in Address Book
- Subject: Parsing phone/emails in Address Book
- From: Darwin Zins <email@hidden>
- Date: Fri, 7 Mar 2003 21:31:30 -0600
I am new to applescript and I was wondering if there is a
better/preferred/less verbose way to do this:
tell application "Address Book"
set peopleCount to the count of people
end tell
repeat with i from 1 to the peopleCount
tell application "Address Book"
tell person i
set a_phones to {}
set phoneRef to (a reference to a_phones)
set phoneCount to the count of phones
set existingPhones to (every phone)
repeat with j from 1 to the phoneCount
set currentItem to item j of existingPhones
copy value of currentItem to the end of phoneRef
end repeat
set a_emails to {}
set emailRef to (a reference to a_emails)
set emailCount to the count of emails
set existingEmails to (every email)
repeat with j from 1 to the emailCount
set currentItem to item j of existingEmails
copy value of currentItem to the end of emailRef
end repeat
Any comments or suggestions?
All I'm trying to do is copy the values of the phone numbers and email
addresses to a list, seems like a lot of code.
Thank you
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.