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

Re: Entourage: Applescript access to a mail view folder - by Barry

Barry
Tue Jan 31 10:28:59 CST 2006

On 31/1/06 09:21, in article C004EAC3.270F%brtfgz@freenet.de, "Berthold
Fagerz" <brtfgz@freenet.de> wrote:

> 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.

--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Check out the Entourage User's WebLog for hints, tips and troubleshooting
<http://homepage.mac.com/barryw/weblog/weblog.html>


Re: Entourage: Applescript access to a mail view folder - by Berthold

Berthold
Tue Jan 31 12:41:00 CST 2006

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


Re: Entourage: Applescript access to a mail view folder - by Paul

Paul
Tue Jan 31 15:32:56 CST 2006

On 1/31/06 1:21 AM, in article C004EAC3.270F%brtfgz@freenet.de, "Berthold
Fagerz" <brtfgz@freenet.de> wrote:

>
> 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.


Re: Entourage: Applescript access to a mail view folder - by Barry

Barry
Tue Jan 31 17:56:47 CST 2006

On 31/1/06 21:32, in article C0051788.C10FE%berkowit@spoof_silcom.com, "Paul
Berkowitz" <berkowit@spoof_silcom.com> wrote:

> On 1/31/06 1:21 AM, in article C004EAC3.270F%brtfgz@freenet.de, "Berthold
> Fagerz" <brtfgz@freenet.de> wrote:
>
>>
>> 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.

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

--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Check out the Entourage User's WebLog for hints, tips and troubleshooting
<http://homepage.mac.com/barryw/weblog/weblog.html>


Re: Entourage: Applescript access to a mail view folder - by Berthold

Berthold
Wed Feb 01 06:53:52 CST 2006

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


Re: Entourage: Applescript access to a mail view folder - by Mickey

Mickey
Fri Feb 03 20:03:12 CST 2006

See this post by Paul Berkowitz on the Entourage-Talk list:
<http://snipurl.com/m7sw>

On 1/31/06 3:21 AM, in article C004EAC3.270F%brtfgz@freenet.de, "Berthold
Fagerz" <brtfgz@freenet.de> wrote:

> 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
>

--
Mickey Stevens (Microsoft MVP for Office:mac)
PowerPoint FAQ featuring PowerPoint:mac: <http://www.pptfaq.com/>
Entourage Help Page: <http://www.entourage.mvps.org/>