Re: getting address book data into FM pro
Re: getting address book data into FM pro
- Subject: Re: getting address book data into FM pro
- From: Jay Louvion <email@hidden>
- Date: Sun, 20 Feb 2011 14:59:10 +0100
- Thread-topic: getting address book data into FM pro
Title: Re: getting address book data into FM pro
This doesn’t take into account the calculated part, but to get you going, because scripting those two is not that straightforward you can read and adapt this...
tell application "Address Book"
set ThesePeople to selection --but you can also say "every person of group X" for example
set ThisPerson to item 1 of ThesePeople
set {MrMrs, FirstName, LastName, JobTitle, IsACompany, CompanyName, MainNr, DirectNr, FaxNr, MobeNr, EmailAddress, WebSite, SkypeName, TheStreet, TheZIP, TheCity, TheCountry, NotesContent} to ({title, first name, last name, job title, company, organization, (value of phone 1), (value of phone 2), (value of phone 3), (value of phone 4), (value of email 1), (value of url 1), (value of AIM Handle 1), street of address, zip of address, city of address, country of address, note} of ThisPerson)
end tell
Then all you need is to map the variables to the different fields in FM.
try
tell application "FileMaker Pro Advanced"
set NewRecord to create new record in database "your_database_name"
go to last record
tell NewRecord
set cell "a_cell_name" to MrMrs
-- [...etc...]
activate
end tell
show NewRecord
end tell
on error mistake number nmr
if nmr is not -128 then
display dialog mistake buttons {"Ok."} default button 1
end if
end try
Good luck.
j.
Jay Louvion
Studio Casagrande
3, rue Müller-Brun
1208 Geneva
T+4122 840 3272
F+4122 840 3271
www.studiocasagrande.com
P Please consider the environment before printing this email.
On 19.02.2011 13:57, "Bob Cuilla" <email@hidden> spake thus:
I would like to have a calculated script in FM Pro that extracts the name of people in my address book. I would then like to place it into a FM pro field. Can anyone point me in the right direction to get started
Thanks
Bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden