Entourage: Applescript access to a mail view folder - possible?How?

B

Berthold Fagerz

Hello!

A question to script Entourage using ist built-in fast mail search:

Is there a way to get the selection of mails that is filtered through a mail
view folder into an AppleScript?
Sort of "get every mail of <my custom mail view folder>"?

Thanks for help,

Bert
 
B

Barry Wainwright [MVP]

Hello!

A question to script Entourage using ist built-in fast mail search:

Is there a way to get the selection of mails that is filtered through a mail
view folder into an AppleScript?
Sort of "get every mail of <my custom mail view folder>"?

Thanks for help,

Bert
If the messages are selected you can use:

tell application "Microsoft Entourage"
set theMessages to current messages
end tell
-- > {incoming message id 605356 of application "Microsoft Entourage",
incoming message id 586486 of application "Microsoft Entourage"}

'current messages' will return a list of messages that are:

The currently selected messages in a folder listing or mail view;
Or the message in a currently open message window;
Or the message currently being handled by the rule that called the script.
 
B

Berthold Fagerz

Barry Wainwright [MVP] wrote/schrieb:
If the messages are selected you can use: ....
'current messages' will return a list of messages that are:

The currently selected messages in a folder listing or mail view;
Or the message in a currently open message window;
Or the message currently being handled by the rule that called the script.

That is getting me somewhere :) Is there also a way to select the mails in
a mail view or the mail view folder itself?

Thank you,

Bert
 
P

Paul Berkowitz

A question to script Entourage using ist built-in fast mail search:

Is there a way to get the selection of mails that is filtered through a mail
view folder into an AppleScript?
Sort of "get every mail of <my custom mail view folder>"?

No there isn't. 'custom view' has no 'results' property, only name and ID
properties. There's nothing much you can do with it. It's been requested
often - we can only hope it will eventually be possible. I answered the same
question in greater detail about 2 days ago. Another hope is that maybe when
the next update comes out with Spotlight features, there might be some way
to script the Spotlight files - we'll have to wait and see. In the meantime
you can only use the same criteria via AppleScript - meaning iterating
folder by folder with a recursive handler that checks subfolders -- really,
really slow and tedious.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
B

Barry Wainwright [MVP]

No there isn't. 'custom view' has no 'results' property, only name and ID
properties. There's nothing much you can do with it. It's been requested
often - we can only hope it will eventually be possible. I answered the same
question in greater detail about 2 days ago. Another hope is that maybe when
the next update comes out with Spotlight features, there might be some way
to script the Spotlight files - we'll have to wait and see. In the meantime
you can only use the same criteria via AppleScript - meaning iterating
folder by folder with a recursive handler that checks subfolders -- really,
really slow and tedious.

Or maybe you could use UI scripting to 'select all' in a CV window - not
tested this yet...
 
B

Berthold Fagerz

Barry Wainwright [MVP] wrote/schrieb:
Or maybe you could use UI scripting to 'select all' in a CV window - not
tested this yet...

That's an interesting idea! Thanks.
Bert
 
Top