July 31, 200619 yr Newbies Does anyone have an apple script that sends contact data from filemaker to os x address book? Name, phone number, address, email, etc I am mostly ignorant of applescript, but after looking over a jim crack of a script for exporting events from filemaker to calendar, I think I can swing it if I just had an outline to go from.
July 31, 200619 yr for prefab solutions, and here is one: http://econtact.slade.de/en/fm2ab.php But it's quite easy with an embedded script: tell application "Address Book" set foo to make new person at the end of the people with properties {first name:"Søren", last name:"Dyhr", company:true, organization:"Lydtekniker Søren Dyhr"} make new email at end of foo's emails with properties {label:"work", value:"[email protected]"} make new address at end of foo's addresses with properties {label:"work", street:"Axelhøj 23c", zip:"2610", city:"Rødovre", country:"Danmark"} make new phone at end of foo's phones with properties {label:"work", value:"40423223"} save addressbook end tell ...where each value are ushered in from the database underneath, via Evaluate( and escape values. --sd Edited August 1, 200619 yr by Guest
July 31, 200619 yr This site was posted yesterday by Fenton for another need, but I noticed a couple of tools there, that could be of interest to you, having to do with what you asked. http://www.jonathanstark.com/downloads.php also, you will want to check out www.clevelandconsulting.com Notice there CC Calendar add above, they have a file (or two) that works with Address Book. HTH Lee
July 31, 200619 yr Author Newbies Thank you, I am not looking for a prefab solution-- I want to license a runtime of my finished database, so I want it totally custom. I much appreciate the above example, it looks like enough to go on. I will try to implement it later today and let you know how it works. By the way the johnathan stark site is where I grabbed the calendar script.
July 31, 200619 yr Author Newbies Here is a script for adding an event to ical from filemaker. This script was originally written by Jonathan Stark, but modified by me I found it to be very handy, so I'm sharing it. tell application "FileMaker Pro Advanced" tell current record set theCalendarTitle to cellValue of cell "IcalName" set theSummary to cellValue of cell "Event Name" set theDescription to cellValue of cell "Notes" set theStartDate to cellValue of cell "Start Date" set theStartTime to cellValue of cell "Start Time" set theEndDate to cellValue of cell "End Date" set theEndTime to cellValue of cell "End Time" end tell end tell set theStartDateAsText to theStartDate & " " & theStartTime as text set theEndDateAsText to theEndDate & " " & theEndTime as text set theStartDate to date theStartDateAsText set theEndDate to date theEndDateAsText tell application "iCal" activate set allCalendarTitles to the title of every calendar if allCalendarTitles contains theCalendarTitle then set theCalendarNumber to (first calendar whose title is theCalendarTitle) else set theCalendarNumber to (make calendar at end of calendars with properties {title:theCalendarTitle}) end if set theEvent to (make event at end of events of theCalendarNumber with properties {start date:theStartDate, end date:theEndDate, summary:theSummary, description:theDescription}) show theEvent end tell --Thanks to Jonathan Stark
August 1, 200619 yr Author Newbies Solved! Thanks a lot guys! I am posting this solution for others seeking the same. One more thing I would like to do is similar to calendar script above. I would like to evaluate address book groups to see if the appropriate group already exists. If not have it create a new group with my chosen title and place all new entries from filemaker into that group. Any ideas? tell application "FileMaker Pro Advanced" tell current record set theFirstName to cellValue of cell "BrideGroom" set theLastName to cellValue of cell "Groom Last" set theAddress to cellValue of cell "Address" set theCity to cellValue of cell "City" set theState to cellValue of cell "State" set theZip to cellValue of cell "Zip" set theCountry to cellValue of cell "Country" set theBridePhone to cellValue of cell "Bride Phone #" set theGroomPhone to cellValue of cell "Groom Phone #" set theBrideEmail to cellValue of cell "Bride Email" set theGroomEmail to cellValue of cell "Groom Email" set theNotes to cellValue of cell "Wedding Info" end tell end tell tell application "Address Book" activate set foo to make new person at the end of the people with properties {first name:theFirstName, last name:theLastName, company:false, note:theNotes} make new email at end of foo's emails with properties {label:"B Email", value:theBrideEmail} make new email at end of foo's emails with properties {label:"G Email", value:theGroomEmail} make new address at end of foo's addresses with properties {label:"home", street:theAddress, zip:theZip, city:theCity, state:theState, country:theCountry} make new phone at end of foo's phones with properties {label:"B Phone", value:theBridePhone} make new phone at end of foo's phones with properties {label:"G Phone", value:theGroomPhone} save addressbook end tell
August 1, 200619 yr Author Newbies Got it! tell application "FileMaker Pro Advanced" tell current record set theGroupName to cellValue of cell "Address Book Group" set theFirstName to cellValue of cell "BrideGroom" set theLastName to cellValue of cell "Groom Last" set theAddress to cellValue of cell "Address" set theCity to cellValue of cell "City" set theState to cellValue of cell "State" set theZip to cellValue of cell "Zip" set theCountry to cellValue of cell "Country" set theBridePhone to cellValue of cell "Bride Phone #" set theGroomPhone to cellValue of cell "Groom Phone #" set theBrideEmail to cellValue of cell "Bride Email" set theGroomEmail to cellValue of cell "Groom Email" set theNotes to cellValue of cell "Wedding Info" end tell end tell tell application "Address Book" activate set allGroupNames to the name of every group if allGroupNames contains theGroupName then set theGroupNumber to (first group whose name is theGroupName) else set theGroupNumber to (make group at end of groups with properties {name:theGroupName}) end if set theBrideGroom to make new person at the end of theGroupNumber with properties {first name:theFirstName, last name:theLastName, company:false, note:theNotes} make new email at end of theBrideGroom's emails with properties {label:"B Email", value:theBrideEmail} make new email at end of theBrideGroom's emails with properties {label:"G Email", value:theGroomEmail} make new address at end of theBrideGroom's addresses with properties {label:"home", street:theAddress, zip:theZip, city:theCity, state:theState, country:theCountry} make new phone at end of theBrideGroom's phones with properties {label:"B Phone", value:theBridePhone} make new phone at end of theBrideGroom's phones with properties {label:"G Phone", value:theGroomPhone} save addressbook end tell Applescripting is fun!
Create an account or sign in to comment