Well, actually, since the ultimate goal is a script for Entourage, hopefully
this won't be considered too far OT.

Is there some way in AppleScript to make use of a textual version of a
property to get that property? For example, say I have a list of properties
for a contact that includes "first name", "last name", etc, but they're text
(i.e., strings). Is there a way to make use of them to get the associated
value (i.e., "get first name of x")?

I know I could do this with if statements (if thelist contains "first name"
then get first name of x), but there are a lot of properties in a contact
and that could get unwieldy.

If it's not possible (and I suspect it isn't), is there some way other than
the "if" method that I could use?

On a related note, is there a way to get a list of the available properties
for a contact? I think I can do this with any of several osaxen that read
resources, but I'd prefer to avoid that if possible. These can be hard-coded
in the Word dialog, but in the event that a new release of Entourage adds
more properties, I'd like to be able to build the list dynamically.

This is for the project I mentioned the other day. Starting with a Word
dialog, you'd specify the criteria for various properties of a contact that
you wanted to use to create a data merge document for use in Word. For
example, you'd specify that you wanted state to be "MI", so only contacts
who have "MI" as the value for state would be included. The results of your
choices will be stored in a text file (the "query file"), then that file
will be used by an Entourage AppleScript to build the data merge document.

I don't have all of it figured out yet, but the file would be in a format
something like (in part):

    "property name" (e.g, "first name")
    desired value
    etc
    *** end of properties ***

Only those properties that the user selects would be used as criteria, which
is another reason why I want to avoid the "if" approach. Seems like a bit of
overkill if you only want to include everyone who has company "XYZ" as their
company, so the only property you'd need to check is company.

Thanks for any help or suggestions.

George

-- 
George Clark - [EMAIL PROTECTED]



-- 
To unsubscribe:               <mailto:[EMAIL PROTECTED]>
To search the archives: 
          <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to