Title: Re: Simple script question
On 8/10/02 9:35 PM, "Paul Berkowitz" <[EMAIL PROTECTED]> wrote:
>> BTW, when I tried to compile your script, it wouldn't until I moved the
>> 'tell front window' block in your ProcessMsg handler inside the 'tell
>> "Microsoft Entourage"' block.
>
> Right. There's some funny business going on here. The script couldn't have
> compiled and set those lurid formatting colors in that state. Lines have
> been moved!

It compiled for me as sent; then I copied and pasted it into an email :) Here it is again, just to be sure I didn’t accidentally munge it before:


tell application "Microsoft Entourage"
    set currentMessages to the current messages
   if currentMessages = {} then
       error "No messages selected. Select at least one message in a folder, or open a message to file."
        error -128
    end if
   repeat with theMsg in the currentMessages
       my ProcessMsg(theMsg)
    end repeat
end
tell

on ProcessMsg(theMsg)
    tell application "Microsoft Entourage"
        set the read status of theMsg to read
       set category of theMsg to {category "Junk"}
        move theMsg to folder " SPAM"
    end tell
   tell the front window
       if class is message window then close
   end tell
end
ProcessMsg


>> Another BTW, and Paul would know about this better than I, but it seems to
>> me that with a script this simple, it would probably be faster to not even
>> use that ProcessMsg handler.
>
> I agree completely. However, since it worked OK with setting read status it
> should also set the category. Unless Dan doesn't have a "Junk" category, in
> which case it should error. Here's what I think:

Nope, I have a category “Junk”

> There's some other Rule in operation which is stripping the category. Is
> this by any chance an IMAP account?

Nope, it’s a POP account, and I’m not using this script in a rule — I only use it manually after email has been downloaded and all rules have of course already been run. And I don’t have any other rules or scripts that strip categories.


On 8/10/02 8:56 PM, "George Clark" <[EMAIL PROTECTED]> wrote:
>On 8/10/02 22:47, Paul Berkowitz wrote:
>> Maybe you need to make the color for Junk category more distinctive.
>
> Or include 'Categories' as one of the columns in your message view.

I do both already :)

Reply via email to