Re: Scripting the address book OS X
Re: Scripting the address book OS X
- Subject: Re: Scripting the address book OS X
- From: Michelle Steiner <email@hidden>
- Date: Mon, 6 Jan 2003 12:58:40 -0700
On Sunday, January 5, 2003, at 11:42 AM, Mark Evans wrote:
Any one have any links about this? I am trying to get a script made to
export that e-mail address's into a text file separated by ", ". Any
help would be appreciated.
The script I posted to the list yesterday should give you a good start.
It writes the name and the addresses in a tab-delimited line of text,
and separates the lines with returns.
Here it is again, in case you missed it.
set outfilename to choose file name
set outfile to open for access outfilename with write permission
tell application "Address Book"
repeat with thisPerson in the people
my writemyfile(outfile, name of thisPerson as text)
repeat with ThisAddress in email of thisPerson
my writemyfile(outfile, tab & value of ThisAddress)
end repeat
my writemyfile(outfile, return)
end repeat
end tell
close access outfile
on writemyfile(filetowrite, itemToWrite)
write the itemToWrite to the filetowrite
end writemyfile
--Michelle
"There's some good in the world, Mr. Frodo, and it's worth fighting
for."
_______________________________________________
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.