I have set of contacts on my Palm that needs to be updated every few weeks with fresh information, all obtained from a separate database. I have a nifty script that makes records from that database, and can then install them into the Palm. Currently, I delete all the contacts, then install the new ones. It is not terribly burdensome, nor time consuming (about 600 contacts total), but there is the rare situation that I would like to retain some bit of data from a contact and would rather not just delete it outright.
What I would like to move onto is an updating script, but I cannot figure out how to extract a list of values from the records to use for comparison purposes. Specifically, each contact has a unique ID number. Every few weeks, some contacts need to be deleted, and some new ones added, so I thought that an initial run through would simply pull up two lists of ID numbers to compare. Unfortunately, this does not work:
set a to {{id:5, bb:"got"}, {id:6, bb:"no"}, {id:7, bb:"him"}}
tell a to set b to the id of every record
-->Error: Can't get id of {{id:5, bb:"got"}, {id:6, bb:"no"}, {id:7, bb:"him"}
Nor does it work when converted to list format:
set a to {{5, "got"}, {6, "no"}, {7, "him"}}
set b to the first item of (a's every item)
-->{5, "got"}
Am I doomed to simply repeating through the lists of records and building lists from scratch, or is there a neater way to do this? I had hoped that it would be as simple as
tell application "iTunes" to set all_PLaylists to the name of every playlist