Reading Address Book |
| Author |
Jan Erik Moström
|
| Last modified |
2000-07-10
|
|
What is this?
Just a short example of how to read addresses from the address book and save it to a file.
|
tell application "Mailsmith 1.1"
set outFile to open for access file "out" with write permission
set emailAddresses to every person
repeat with i in emailAddresses
set uName to name of i
set uNotes to notes of i
set li to label index of i
if li = 0 then
set uLabel to "None"
else
set uLabel to (name of label li) as string
end if
set uPrefAdr to address string of (preferred address of i)
write "-----------
Name : " & uName & "
Address : " & uPrefAdr & "
Label : " & uLabel & "
Notes : " & uNotes & "
-----------
" to outFile
end repeat
close access outFile
end tell
|