so far i’v got this : selecting records from FrontBase & adding data to Address Book, except from the phone field / e-mail field
must be something with “at the end of phones” or something like that
always get different errors from applescript compile
don’t understand the :“” syntax in the properties either
tell application “FBScriptAgent”
make new connection at the end of connections
tell last connection
connect hostname “localhost” databaseName “MyDB” username “_system”
set myRows to executeFetchAndCancel numberOfRows 50 sql “select cfirst_name,clast_name,cphone,ccompany from tpersons”
repeat with myrow in myRows
set cfirst_name to item 1 of myrow
set clast_name to item 2 of myrow
set cphone to item 3 of myrow
set ccompany to item 4 of myrow
tell application “Address Book”
– new person
set thisperson to make new person
set myproperties to {first name:“”, last name:“”, organization:“”}
set first name of myproperties to cfirst_name
set last name of myproperties to clast_name
set organization of myproperties to ccompany
set properties of thisperson to myproperties
– new phone
– set thisphone to make new phone at end of phones of thisperson
– set properties of thisphone to {“work”, cphone}
– either
–set thisphone to add phone to end of phones of thisperson
–set myproperties to {label:“”, value:“”}
–set label of myproperties to “work”
–set value of myproperties to cphone
–set properties of thisphone to myproperties
– add to group
add thisperson to group “Imported Addresses”
save addressbook
end tell
end repeat
disconnect
end tell
end tell
there must be something i’m missing, i’m not really familiar with interpreting the dictionnary of Address Book
anyone ?
Model: PowerBook G4
Browser: Safari 312.3
Operating System: Mac OS X (10.3.9)