I always like to look at threads dealing with scripts. I have a script I use, "Open enclosing folder", which will open the folder that contains a message in a mail browser window, and if the folder list is shown, the folder will be selected in the folder list as well, and the message will be selected in the message list.

I use this all the time when I have a message that shows up in a custom view or a Find.

tell application "Microsoft Entourage" --

set currentMessages to current messages --

repeat with i from 1 to (count currentMessages) --

set theMsg to item i of currentMessages

my ProcessMsg(theMsg) --

end repeat --

end tell --


on ProcessMsg(theMsg) --

tell application "Microsoft Entourage"

try

set aFolder to storage of theMsg

activate

try

set mailWindow to first browser window whose displayed area is mail area

select mailWindow

on error -- there's no browser window set to mail at the moment

open main window -- opens, or brings current front browser to front

set displayed area of main window to mail area

set mailWindow to main window

end try

set the displayed feature of mailWindow to aFolder

set the selection to { theMsg}

on error theErr

display dialog theErr

end try

end tell

end ProcessMsg



Reply via email to