Hi!

I created an AppleScript to quit Entourage every day (so that it's not
downloading my pop mail while I'm at work).

This script is called from Entourage on a Schedule (which works just
fine) and the script itself worked great under Entourage X.

Now that I'm using Entourage 2004, however, I get about a 30% success
rate - but 70% of the time, the application hangs and I have to force
quit.

Here's the script:

tell application "Microsoft Entourage"
activate
quit
end tell

Any one out there have any thoughts on what I'm doing incorrectly? If I
remove the "activate" line, it also works... but I don't know if that's
the problem.

Thoughts?

Thank you!

~Jeff
--
Download the new AppleSpec Database (r.1/03)
www.applespec.com

Re: AppleScript to autoquit Entourage by Allen

Allen
Thu Dec 30 13:49:54 CST 2004

> 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_3187252209_4990202
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit

Could be some kind of timing conflict. After all, the script runs within
Entourage, and you are quitting the script's context, a bit like sawing off
the tree limb you are sitting on.

I'd do this (if I were to want to) with a cron job instead; use Cronnix to
set it up, and use the "osascript" command to run your script that quits
Entourage.

A kinder, gentler method might be a script that toggles "Work Offline"
instead of quitting the application. That should run from within Entourage
without any difficulty. When off line, Entourage won't check mail. Running
the script a second time will put Entourage back online.

tell application "Microsoft Entourage"
activate
end tell
tell application "System Events"
tell application process "Microsoft Entourage"
click menu item "Work Offline" of menu "Entourage" of menu bar item
"Entourage" of menu bar 1
end tell
end tell



On 12/29/04 2:42 PM, in article
06d10eabdbebbbe39d0f8cf2bc7448e6@news.meganetnews.com, "Fletch"
<fletch699@yahoo.com> wrote:

> Hi!
>
> I created an AppleScript to quit Entourage every day (so that it's not
> downloading my pop mail while I'm at work).
>
> This script is called from Entourage on a Schedule (which works just
> fine) and the script itself worked great under Entourage X.
>
> Now that I'm using Entourage 2004, however, I get about a 30% success
> rate - but 70% of the time, the application hangs and I have to force
> quit.
>
> Here's the script:
>
> tell application "Microsoft Entourage"
> activate
> quit
> end tell
>
> Any one out there have any thoughts on what I'm doing incorrectly? If I
> remove the "activate" line, it also works... but I don't know if that's
> the problem.
>
> Thoughts?
>
> Thank you!
>
> ~Jeff


--B_3187252209_4990202
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Re: AppleScript to autoquit Entourage</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>Could=
be some kind of timing conflict. After all, the script runs within Entourag=
e, and you are quitting the script's context, a bit like sawing off the tree=
limb you are sitting on.<BR>
<BR>
I'd do this (if I were to want to) with a cron job instead; use Cronnix to =
set it up, and use the &quot;osascript&quot; command to run your script that=
quits Entourage.<BR>
<BR>
A kinder, gentler method might be a script that toggles &quot;Work Offline&=
quot; instead of quitting the application. That should run from within Entou=
rage without any difficulty. When off line, Entourage won't check mail. Runn=
ing the script a second time will put Entourage back online.<BR>
<BR>
<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLOR=3D"#DD0000">application<=
/FONT> &quot;Microsoft Entourage&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#DD0000">activate<BR>
</FONT><FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=3D"#0000FF"><B>tel=
l<BR>
tell</B></FONT> <FONT COLOR=3D"#DD0000">application</FONT> &quot;System Event=
s&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLO=
R=3D"#DD0000">application process</FONT> &quot;Microsoft Entourage&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#DD0000">click=
</FONT> <FONT COLOR=3D"#DD0000">menu item</FONT> &quot;Work Offline&quot; <FON=
T COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#DD0000">menu</FONT> &quot;E=
ntourage&quot; <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#DD0000">=
menu bar item</FONT> &quot;Entourage&quot; <FONT COLOR=3D"#0000FF"><B>of</B></=
FONT> <FONT COLOR=3D"#DD0000">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>
<BR>
<BR>
On 12/29/04 2:42 PM, in article 06d10eabdbebbbe39d0f8cf2bc7448e6@news.megan=
etnews.com, &quot;Fletch&quot; &lt;fletch699@yahoo.com&gt; wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">&gt; Hi!<BR>
&gt; <BR>
&gt; I created an AppleScript to quit Entourage every day (so that it's not=
<BR>
&gt; downloading my pop mail while I'm at work).<BR>
&gt; <BR>
&gt; This script is called from Entourage on a Schedule (which works just <=
BR>
&gt; fine) and the script itself worked great under Entourage X.<BR>
&gt; <BR>
&gt; Now that I'm using Entourage 2004, however, I get about a 30% success =
<BR>
&gt; rate - but 70% of the time, the application hangs and I have to force =
<BR>
&gt; quit.<BR>
&gt; <BR>
&gt; Here's the script:<BR>
&gt; <BR>
&gt; tell application &quot;Microsoft Entourage&quot;<BR>
&gt; &nbsp;&nbsp;&nbsp;activate<BR>
&gt; &nbsp;&nbsp;&nbsp;quit<BR>
&gt; end tell<BR>
&gt; <BR>
&gt; Any one out there have any thoughts on what I'm doing incorrectly? &nb=
sp;If I <BR>
&gt; remove the &quot;activate&quot; line, it also works... but I don't kno=
w if that's <BR>
&gt; the problem.<BR>
&gt; <BR>
&gt; Thoughts?<BR>
&gt; <BR>
&gt; Thank you!<BR>
&gt; <BR>
&gt; ~Jeff<BR>
</FONT></SPAN></FONT>
</BODY>
</HTML>


--B_3187252209_4990202--


Re: AppleScript to autoquit Entourage by Fletch

Fletch
Thu Dec 30 14:30:00 CST 2004

Thanks... I think Cronix is the way to go.

~J

In article <BDF99BE2.D14B%allenwatson@earthlink.net>,
Allen Watson <allenwatson@earthlink.net> wrote:

> Could be some kind of timing conflict. After all, the script runs within
> Entourage, and you are quitting the script's context, a bit like sawing off
> the tree limb you are sitting on.
>
> I'd do this (if I were to want to) with a cron job instead; use Cronnix to
> set it up, and use the "osascript" command to run your script that quits
> Entourage.
>
> A kinder, gentler method might be a script that toggles "Work Offline"
> instead of quitting the application. That should run from within Entourage
> without any difficulty. When off line, Entourage won't check mail. Running
> the script a second time will put Entourage back online.
>
> tell application "Microsoft Entourage"
> activate
> end tell
> tell application "System Events"
> tell application process "Microsoft Entourage"
> click menu item "Work Offline" of menu "Entourage" of menu bar item
> "Entourage" of menu bar 1
> end tell
> end tell
>
>
>
> On 12/29/04 2:42 PM, in article
> 06d10eabdbebbbe39d0f8cf2bc7448e6@news.meganetnews.com, "Fletch"
> <fletch699@yahoo.com> wrote:
>
> > Hi!
> >
> > I created an AppleScript to quit Entourage every day (so that it's not
> > downloading my pop mail while I'm at work).
> >
> > This script is called from Entourage on a Schedule (which works just
> > fine) and the script itself worked great under Entourage X.
> >
> > Now that I'm using Entourage 2004, however, I get about a 30% success
> > rate - but 70% of the time, the application hangs and I have to force
> > quit.
> >
> > Here's the script:
> >
> > tell application "Microsoft Entourage"
> > activate
> > quit
> > end tell
> >
> > Any one out there have any thoughts on what I'm doing incorrectly? If I
> > remove the "activate" line, it also works... but I don't know if that's
> > the problem.
> >
> > Thoughts?
> >
> > Thank you!
> >
> > ~Jeff
--
Download the new AppleSpec Database (r.1/03)
www.applespec.com