Hold Mail script for Entourage 2008

B

Bruce McL

I wrote a script to do two things:

1) Disable and enable receiving mail in Entourage.

2) Let me know at a glance if receiving email is enabled or disabled, even
when Entourage is hidden. This is done in the dock, where I look for new
mail and where I check to see if Entourage is running.

Here is the script I worked up.


(*

Hold Mail - stop and start checking mail with Entourage
*)
on run
tell application "Microsoft Entourage"
if working offline is false then
set working offline to "true"
tell application "System Events" to set visible of process
"Microsoft Entourage" to false
end if
end tell
end run

on quit
tell application "Microsoft Entourage"
if working offline is true then
set working offline to "false"
tell application "System Events" to set frontmost of process
"Microsoft Entourage" to true
if name of schedule "receive" exists then
execute schedule "receive"
end if
continue quit
end if
end tell
end quit


Save it as an Application Bundle called "Hold Mail" that stays open and has
no startup screen. Put a nice icon on it and put it in your dock next to
Entourage.

Start up the "Hold Mail" app to go offline and hide Entourage. Quit the
"Hold Mail" app to go online, unhide Entourage, and check mail.

If the Hold Mail icon in the dock is running, your email is "on hold." If it
is not running (and Entourage is running) then mail is getting through.

Note: You must name your Entourage schedule for checking mail "receive" to
get your mail checked as soon as you quit Hold Mail. Otherwise your mail
will be checked on your regular schedule.

I am giving this script away here. Perhaps someone will adopt it, polish it
up, and publish it on the MVP site or scriptbuilders site. That's fine with
me. If you want to give me some credit, the name Bruce McL will do.

I wrote this because I like to start and stop email delivery many times
during the day for several different reasons. Sometimes I want to
concentrate on computer work, sometimes I'm leaving for a while and I want
new email to show up on my mobile phone.

Starting up Entourage 2008 takes a long time, and I am tired of looking at
the splash screen. Anybody know why Entourage *needs* a splash screen? I
already bought it, why should I have to sit through a commercial every time
I launch it? Oh well, another rant for another day.

Things that can be improved:
- Make an icon that changes color when the app starts up and changes back
when the app quits. I believe an AppleScript app could rename a couple of
..icns files inside it's own application bundle, but I haven't put time into
that.
- Better error checking.
- More flexible procedure for immediately checking email on quit.
- Write a helper script to invoke this from Entourage with a key command.
Command-Option-K perhaps?

What Microsoft could do to improve Entourage in this regard:
- Make an overlay for the Entourage dock icon, perhaps an envelope inside a
red circle with slash, that shows up when Entourage is offline. This would
be a big help when clients accidentally go offline, then call me up and say,
"My email is broken." If they could see a funny looking symbol on their
Entourage dock icon that would identify the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top