address book export to .addressbook file
address book export to .addressbook file
- Subject: address book export to .addressbook file
- From: "Patrick Collins" <email@hidden>
- Date: Fri, 2 Sep 2005 21:29:56 -0700 (PDT)
- Organization: Collinator Studios
Hello Applescripters... I need a lot of help with this one:
I am using pine, the unix commandline email program.. however it
references an addressbook file called .addressbook which has the format
of this:
Nickname, Fullname, Email Address(es), Fcc, Comment
So.. What I am trying to do is go through each addressbook card and
extract those fields into the following format example:
Nickname="Default Company"
Fullname="John Smith"
EmailAddress="email@hidden" -- If multiple addresses, it must
be "(email@hidden,email@hidden,email@hidden)
Fcc=""
Comment="He's a visionary" (Notes field from Addressbook)
After this information is extracted from addressbook, then I need to
modify the .addressbook file and add to it:
Nickname+(TAB)+Fullname+(TAB)+Fcc+(TAB)+Comment
...
So far, I have this (which is not much I know):
activate application "Address Book"
tell application "Address Book"
set theNames to name of every person
set theEmails to email of every person
end tell
activate application "iTerm"
repeat with x in theNames
tell application "iTerm"
write text x
end tell
end repeat
... I cannot get the emails to work, it keeps showing up as this in the
log: {email 1 of person id "145F0118-2128-11D9-8C79-000D9337B3FC:ABPerson"}
.. so I am a little stuck.. can anyone please help?
I wsa trying to have my terminal program do the text writing, but that
wasn't working.. Though it doesn't matter, it could be done in
text-edit as long as there are TAB keys inbetween each field.
I thank you in advance for the guidance.
-patrick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden