Address Book & Applescript

sims sims at ezpzapps.com
Mon Dec 23 11:47:01 EST 2002


The following applescript will grab names and the birth date field from
the Address Book BUT only in Mac OS 10.2.3

Does anyone have the special Apple incantation for getting the
birth date from the Address Book BUT in Mac OS 10.2 up to 10.2.3??

Also - Happy Holidays to all!

sims


tell application "Finder" to make file at desktop with properties 
{name:"Birthday export.txt"}
set exportFile to (((path to desktop) as string) & "Birthday 
export.txt") as alias

tell application "Address Book"
	set addressBookAsList to every person
	open for access exportFile with write permission
	repeat with i from 1 to count of addressBookAsList
		set theName to (name of item i of addressBookAsList)
		set theBirthDate to (birth date of item i of 
addressBookAsList) as string
		write (theName & tab & theBirthDate & return) as 
string starting at eof to exportFile
	end repeat
	close access exportFile
end tell



More information about the Use-livecode mailing list