Sync or Import/Export w/Address Books

sims sims at ezpzapps.com
Tue Mar 30 10:50:51 EST 2004


>I'm looking for information to import and export to both Apple's and 
>Microsoft's Address Books from a Rev app under development. Ideally, 
>I would like to provide a sync mechanism such as iSync on the Mac 
>but that is optional at this point.
>
>The vCard export from Apple's Address Book looks fairly 
>straightforward once I get all of the key choices and the same for 
>LDIF. However, I don't have any information regarding programming 
>with iSync.

Here is an applescript that might be a start if you go that route.

HTH

sims


tell application "Finder" to make file at desktop with properties 
{name:"export.txt"}
set exportFile to (((path to desktop) as string) & "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
		set eAddress to {value of first email of item i of 
addressBookAsList}
		write (theName & tab & theBirthDate & tab & eAddress 
& return) as string starting at eof to exportFile
	end repeat
	close access exportFile
	quit application "Address Book"
end tell


-- 
Tech Conferences  http://TechieTours.com
We make...
iBirthday      http://EZPZapps.com/iB
SmartDog    http://EZPZapps.com/SmartDog
Kartolina      http://EZPZapps.com/kartolina


More information about the use-livecode mailing list