On 11/3/00 8:43 AM, "helpdesk" <[EMAIL PROTECTED]> wrote:
> on 11/3/2000 10:06 AM, Allen Watson wrote:
>
>> I've been trying to enhance my script to find duplicate contacts to create a
>> version that will locate all contacts, assign them a special category, and
>> then finish with that set of contacts "found" in the Address Book. I have
>> all but the last step working.
>
> On a related note, can someone tell me how to change a category of a message
> in a script. I have the message I want to change in a script, but not
> knowing AppleScript, I can't get the "set category ..." line of my script to
> work.
>
category is a list. If you're not concerned about replacing some category
that's already been set (i.e. if you know that there is no category at all
set yet) then you _could_ just do:
set category of theMsg to {category "Friends"}
If there may be some other categories and you want to add this one to it, do
it as follows. If you want it to be the primary category (setting the
color), then put it first, as I do here:
set theCategories to category of theMsg
set category of theMsg to {category "Friends"} & theCategories
If you want its current category to remain primary, then put it after:
set theCategories to category of theMsg
set category of theMsg to theCategories & {category "Friends"}
Either of these ways is perfectly safe even if no category has been set
before: then theCategories = {}, so
{category "Friends"} & theCategories
will simply be {category "Friends"} , as you want. So use either of these
versions.
--
Paul Berkowitz
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
To search the archives:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>