First thanks you Allen Watson for your reply to my first question.

I am trying to make a simple script to move all junk mail from my inbox to
my deleted items folder. Obviously I am working from copied snippets of
scripts and don't know what I'm doing. The junk mail filter is working and
junk is showing up categorized as junk in my Inbox. I also realize the
following script will not only move the messages but permanently delete them
if someone is kind enough to fix it for me.

on run
    tell application "Microsoft Entourage"
        if the class of the front window is main window then
            set theMsg to category junk
            my ProcessMsg(theMsg)
        else
            set theMessages to the selection
            repeat with theMsg in theMessages
                my ProcessMsg(theMsg)
            end repeat
        end if
    end tell
end run

-- process the messages
on ProcessMsg(theMsg)
    tell application "Microsoft Entourage"
        if theMsg is not flagged then
            move theMsg to deleted mail folder
            delete theMsg
        end if
    end tell
end ProcessMsg

Thanks very much.


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

Reply via email to