Jump to content
  • 0

OSX: Filemaker en adresboek


Zjem

Question

4 answers to this question

Recommended Posts

  • 0
Posted

Ooit zoiets gemaakt als oefening in AppleScript. Vond het nog terug op mijn servertje.

Niet erg gesofisticeerd, de sync moet je in FileMaker zelf afhandelen, dat is daar ook het gemakkelijkst.

Bijgevoegd ook het FileMaker bestandje. Kopieer de AppleScript code in je script editor, open het syncer filetje, en als het een beetje meevalt, heb je een voorbeeld om verder mee te werken.

 

global theFile
set theFile to "Syncer"

set AppleScript's text item delimiters to " ? "
tell application "Address Book"
repeat with thePerson in people
	my ImportFileMakerData("people", my GetDataTextItems(properties of thePerson))
	set personID to id of thePerson
	repeat with theData in (addresses of thePerson)
		my ImportFileMakerData("people", {personID} & my GetDataTextItems(properties of theData))
	end repeat
	repeat with theData in (AIM handles of thePerson)
		my ImportFileMakerData("comms", {personID} & my GetDataTextItems(properties of theData))
	end repeat
	repeat with theData in (custom dates of thePerson)
		my ImportFileMakerData("custom dates", {personID} & my GetDataTextItems(properties of theData))
	end repeat
	repeat with theData in (emails of thePerson)
		my ImportFileMakerData("comms", {personID} & my GetDataTextItems(properties of theData))
	end repeat
	-- group access through applescript seems to be broken
	repeat with theData in (ICQ handles of thePerson)
		my ImportFileMakerData("comms", {personID} & my GetDataTextItems(properties of theData))
	end repeat
	repeat with theData in (Jabber handles of thePerson)
		my ImportFileMakerData("comms", {personID} & my GetDataTextItems(properties of theData))
	end repeat
	repeat with theData in (MSN handles of thePerson)
		my ImportFileMakerData("comms", {personID} & my GetDataTextItems(properties of theData))
	end repeat
	repeat with theData in (phones of thePerson)
		my ImportFileMakerData("comms", {personID} & my GetDataTextItems(properties of theData))
	end repeat
	-- related names and urls?
	repeat with theData in (Yahoo handles of thePerson)
		my ImportFileMakerData("comms", {personID} & my GetDataTextItems(properties of theData))
	end repeat
end repeat
end tell

to GetDataTextItems(propertyList)
return (text items of (every item of propertyList as text))
end GetDataTextItems

to ImportFileMakerData(theLayout, theCompleteRecord)
tell application "FileMaker Pro Advanced"
	create new record in layout theLayout of document theFile with data theCompleteRecord
end tell
end ImportFileMakerData

Syncer.fp7

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...