Ga naar inhoud
  • 0

OSX: Filemaker en adresboek


Zjem

Vraag

4 antwoorden op deze vraag

Aanbevolen berichten

  • 0

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

Link naar reactie

Doe mee aan dit gesprek

Je kunt dit nu plaatsen en later registreren. Indien je reeds een account hebt, log dan nu in om het bericht te plaatsen met je account.

Gast
Beantwoord deze vraag...

×   Geplakt als verrijkte tekst.   Plak in plaats daarvan als platte tekst

  Er zijn maximaal 75 emoji toegestaan.

×   Je link werd automatisch ingevoegd.   Tonen als normale link

×   Je vorige inhoud werd hersteld.   Leeg de tekstverwerker

×   Je kunt afbeeldingen niet direct plakken. Upload of voeg afbeeldingen vanaf een URL in

×
×
  • Nieuwe aanmaken...