R
Robert Barrimond
I'm new to AppleScript and have been enjoying the learning experience,
however, I've run into a frustrating stumbling block.
First the context. I'm writing a script to do batch edits on my contacts.
For example, I'd like to use some of the custom fields and need to a
convenient way to edit these values for many, many contacts at one time.
Now the problem. I can't seem to programmatically inspect either the
contact objects or use a reference to to loop through the list of selected
contacts to edit the property the user chooses by a "choose from list" of
strings. My first strategy was to try to access the properties of the
contact objects by converting the user chosen string into a property label
for each selected contact. I couldn't find a way to do this. My second
strategy was to use a reference to create a reference that I would loop
through the contacts and then access the properties of each contact
indirectly. I also failed to make that happen. Either of these I had hoped
would allow me to write a subroutine to handle the actual looping and
editing. This would be trivial in Java, I hope AppleScript isn't forcing me
to commit the Greatest Programming Sin of All: repeat code that should be a
method/function/subroutine.
however, I've run into a frustrating stumbling block.
First the context. I'm writing a script to do batch edits on my contacts.
For example, I'd like to use some of the custom fields and need to a
convenient way to edit these values for many, many contacts at one time.
Now the problem. I can't seem to programmatically inspect either the
contact objects or use a reference to to loop through the list of selected
contacts to edit the property the user chooses by a "choose from list" of
strings. My first strategy was to try to access the properties of the
contact objects by converting the user chosen string into a property label
for each selected contact. I couldn't find a way to do this. My second
strategy was to use a reference to create a reference that I would loop
through the contacts and then access the properties of each contact
indirectly. I also failed to make that happen. Either of these I had hoped
would allow me to write a subroutine to handle the actual looping and
editing. This would be trivial in Java, I hope AppleScript isn't forcing me
to commit the Greatest Programming Sin of All: repeat code that should be a
method/function/subroutine.