On 4/19/02 10:40 AM, "Allen Watson" <[EMAIL PROTECTED]> wrote:
> on ProcessMsg(theMsg) --
> tell application "Microsoft Entourage"
> try
> set aFolder to storage of theMsg
> (open aFolder) in window 1
> on error theErr
> display dialog theErr
> end try
> end tell
> end ProcessMsg
>
> It opens the parent folder in a separate window. You could easily adapt this
> script to display dialog and show the folder name instead. I'm not sure how
> it would behave with a list of mixed items, but I think it would work fine
> if you pre-select just messages. As it stands you would get an error such as
> "Can't get storage of..." for anything other than a message.
Instead of
> on error theErr
> display dialog theErr
> end try
just pass silently over it.
on ProcessMsg(theMsg) --
tell application "Microsoft Entourage"
try
set aFolder to storage of theMsg
(open aFolder) in window 1
end try
end tell
end ProcessMsg
That way folders will open when it's a message and nothing will happen when
it isn't. But this 'in window 1' (which I've never seen before - I like it!)
will keep changing which folder is displayed, I think - too fast to see
anything. You'd be better off opening a separate window for each folder (or
maybe that's what it does already). But then you'll see a lot of windows
jumping around, since every time you tell a folder to open which has already
been opened for another message, it will come to the front. So you might
want to change the above to:
on ProcessMsg(theMsg) --
tell application "Microsoft Entourage"
try
set aFolder to storage of theMsg
set folderName to name of aFolder
if not (exists window folderName) then
open aFolder
end if
end try
end tell
end ProcessMsg
--
Paul Berkowitz
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>