On 12/9/00 07:26, John M Young wrote:

> What designates the prime category when a message has two or more categories
> assigned to it?

The last category added with the Category menu becomes the first category in
the category list, which is the primary category for the item.

If you set the category with a script, e.g.

    set category of themsg to category "Junk"

Then that becomes the only (and thus primary) category.

If you want to add categories to a message's category list, you can use
(assuming themsg has been set as a reference to a message already)

tell application "Microsoft Entourage"
    set catlist to category of themsg
    -- it's probably safest to use ID numbers when possible
    -- That way you don't need to redo the script if you change the name
    set needcat to true
    set wantedID to 4 -- or the ID you want to add
    if catlist is not {} then
        repeat with thecat in catlist
            if ID of thecat = wantedID then
                set needcat to false
                exit repeat
            end if
        end repeat
    end if
    if needcat then
        copy category ID wantedID to end of catlist
        -- maintains current "primary" category; use start instead of
        -- end if you want to change the primary to the new one
        set category of themsg to catlist
    end if 
end tell  

         
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