Does anyone have or know of an applescript that will run all my rules?

Thanks

Re: AppleScript to run all rules by Paul

Paul
Thu Apr 21 13:46:07 CDT 2005

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3196928768_4808283
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit

On 4/21/05 9:33 AM, in article BE8D401C.227B%ccrawford@sieducation.com,
"Carl Crawford" <ccrawford@sieducation.com> wrote:

> Does anyone have or know of an applescript that will run all my rules?

There's no way to do that.* Rules aren't scriptable. On the other hand, just
about any rule can be replicated as a 1-to-3 line AppleScript, so a script
could agglomerate them all.

* There's something called "GUI scripting" - emulating your selected
Message/Apply Rule/All Rules - which should be able to do it but might not
be 100% reliable if something else is going on at the same time - i.e. don't
run it from a schedule. This _should_ work (untested):

tell application "Microsoft Entourage"
set displayed feature of main window to mail area
activate
select main window
--all this should already be in place, with messages selected
end tell
tell application "System Events"
tell process "Microsoft Entourage"
pick menu item "All Rules" of menu 1 of menu item "Apply Rule" of
menu 1 of menu bar item "Message" of menu bar 1
end tell
end tell

or better, if your Entourage is not English-language (or even if it is), for
the second part:

tell application "System Events"
tell process "Microsoft Entourage"
pick menu item 1 of menu 1 of menu item 24 of menu 1 of menu bar
item 6 of menu bar 1
end tell
end tell


--
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_3196928768_4808283
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Re: AppleScript to run all rules</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>On 4/=
21/05 9:33 AM, in article BE8D401C.227B%ccrawford@sieducation.com, &quot;Car=
l Crawford&quot; &lt;ccrawford@sieducation.com&gt; wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">&gt; Does anyone have or know of an applescript that =
will run all my rules?<BR>
</FONT><BR>
There's no way to do that.* Rules aren't scriptable. On the other hand, jus=
t about any rule can be replicated as a 1-to-3 line AppleScript, so a script=
could agglomerate them all.<BR>
<BR>
* There's something called &quot;GUI scripting&quot; - emulating your selec=
ted Message/Apply Rule/All Rules - which should be able to do it but might n=
ot be 100% reliable if something else is going on at the same time - i.e. do=
n't run it from a schedule. This _should_ work (untested):<BR>
<BR>
<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLOR=3D"#0000FF">application<=
/FONT> &quot;Microsoft Entourage&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=
=3D"#0000FF">displayed feature</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <=
FONT COLOR=3D"#0000FF">main window</FONT> <FONT COLOR=3D"#0000FF"><B>to</B></FON=
T> <FONT COLOR=3D"#0000FF">mail area<BR>
</FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF">activate<BR>
</FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF">select</FONT> <FONT COLOR=3D"=
#0000FF">main window<BR>
</FONT> &nbsp;&nbsp;&nbsp;--<FONT COLOR=3D"#4C4D4D"><I>all this should alread=
y be in place, with messages selected<BR>
</I></FONT><FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=3D"#0000FF"><B=
>tell<BR>
tell</B></FONT> <FONT COLOR=3D"#0000FF">application</FONT> &quot;System Event=
s&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLO=
R=3D"#0000FF">process</FONT> &quot;Microsoft Entourage&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF">pick<=
/FONT> <FONT COLOR=3D"#0000FF">menu item</FONT> &quot;All Rules&quot; <FONT CO=
LOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#0000FF">menu</FONT> 1 <FONT COL=
OR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#0000FF">menu item</FONT> &quot;A=
pply Rule&quot; <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#0000FF"=
>menu</FONT> 1 <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#0000FF">=
menu bar item</FONT> &quot;Message&quot; <FONT COLOR=3D"#0000FF"><B>of</B></FO=
NT> <FONT COLOR=3D"#0000FF">menu bar</FONT> 1<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=
=3D"#0000FF"><B>tell<BR>
end</B></FONT> <FONT COLOR=3D"#0000FF"><B>tell<BR>
</B></FONT><BR>
or better, if your Entourage is not English-language (or even if it is), fo=
r the second part:<BR>
<BR>
<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLOR=3D"#0000FF">application<=
/FONT> &quot;System Events&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLO=
R=3D"#0000FF">process</FONT> &quot;Microsoft Entourage&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"=
>pick</FONT> <FONT COLOR=3D"#0000FF">menu item</FONT> 1 <FONT COLOR=3D"#0000FF">=
<B>of</B></FONT> <FONT COLOR=3D"#0000FF">menu</FONT> 1 <FONT COLOR=3D"#0000FF"><=
B>of</B></FONT> <FONT COLOR=3D"#0000FF">menu item</FONT> 24 <FONT COLOR=3D"#0000=
FF"><B>of</B></FONT> <FONT COLOR=3D"#0000FF">menu</FONT> 1 <FONT COLOR=3D"#0000F=
F"><B>of</B></FONT> <FONT COLOR=3D"#0000FF">menu bar item</FONT> 6 <FONT COLOR=
=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#0000FF">menu bar</FONT> 1<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=
=3D"#0000FF"><B>tell<BR>
end</B></FONT> <FONT COLOR=3D"#0000FF"><B>tell<BR>
</B></FONT><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
-- <BR>
Paul Berkowitz<BR>
MVP MacOffice<BR>
Entourage FAQ Page: <a href=3D"http://www.entourage.mvps.org/faq/index.html">=
&lt;http://www.entourage.mvps.org/faq/index.html&gt;</a><BR>
AppleScripts for Entourage: <a href=3D"http://macscripter.net/scriptbuilders/=
">&lt;http://macscripter.net/scriptbuilders/&gt;</a> <BR>
<BR>
Please &quot;Reply To Newsgroup&quot; to reply to this message. Emails will=
be ignored.<BR>
<BR>
PLEASE always state which version of Microsoft Office you are using - **200=
4**, X &nbsp;or 2001. It's often impossible to answer your questions otherwi=
se.<BR>
</SPAN></FONT>
</BODY>
</HTML>


--B_3196928768_4808283--