I have an Entourage rule that moves messages that have been identified as junk mail to a "Junk" folder under my "inBox". I don't want to delete these messages automatically because sometimes Entourage is wrong about it being junk mail. Once in a while I look at the Junk folder and I can usually tell from the subject lines of the messages that they are indeed junk mail. Then I have to delete them manually which involves selecting them all, etc.
This was irritating, so I wrote an AppleScript to do it, which I then put in the Entourage Script Menu Items folder. Here's the AppleScript:
tell application "Entourage"Enter the script using the Script Editor in /Applications -> AppleScript.
set junkFolder to folder "Junk" of in box folder
set selectedMessages to messages of junkFolder
repeat with theMessage in selectedMessages
set read status of theMessage to read
delete theMessage
end repeat
end tell
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021002063853736