On 10/23/00 8:50 AM, "Joe Gillespie" <[EMAIL PROTECTED]> wrote:

> I haven't been able to figure out how to identify categories with
> AppleScript. 'Category' is a property of 'message' but any attempt to
> address this property fails - probably because I've got the syntax wrong.


'category' is a list of the categories of that messages, identified by its
ID.  I'm not absolutely certain that the message already has been assigned
its categories at this point (haven't checked yet) but, if it has, what you
probably want (running from a Rule on incoming messages) is:

set theMsg to item 1 of (get current messages)
try
    set theNames to name of category of theMsg -- gets all of them as list
on error -- if there aren't any, can't get name
    set theNames to {"None"}
end try



or just 'end try' without the "None" if you don't care.

To set the categories, just do this:

set theMsg to item 1 of (get current messages)
set category of theMsg to {category "Friends", category "Work"}

The one you put first will be the primary category, setting the color. Even
if there's only one, you still have to make it a list:

set category of theMsg to {category "Work"}



I hope that helps.
-- 
Paul Berkowitz


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

Reply via email to