Title: Re: auto-quit entourage
On 28/7/05 02:47, "Norman W. Ferguson" <[EMAIL PROTECTED]> wrote:


tell application "Finder" to set theApps to name of every process
if
{"Microsoft Word"} is in theApps then tell application "Microsoft Word" to quit saving yes
if
{"Microsoft Excel"} is in theApps then tell application "Microsoft Excel" to quit saving yes
if
{"Microsoft Powerpoint"} is in theApps then tell application "Microsoft PowerPoint" to quit saving yes
tell
application "Microsoft Entourage"
    repeat while connection in progress is true
   end repeat
   quit
end
tell
tell
application "Microsoft Database Daemon" to quit

Note that any schedules set to run ‘on quit’ will delay the exit from Entourage, and this script will cause the daemon to quit before it has finished. It would be worth adding a test before quitting the daemon to see if entourage is still running:

tell application "Finder" to set theApps to name of every process
if
{"Microsoft Word"} is in theApps then tell application "Microsoft Word" to quit saving yes
if
{"Microsoft Excel"} is in theApps then tell application "Microsoft Excel" to quit saving yes
if
{"Microsoft Powerpoint"} is in theApps then tell application "Microsoft PowerPoint" to quit saving yes
tell
application "Microsoft Entourage"
    repeat while connection in progress is true
   end repeat
   quit
end
tell
tell application "Finder"
    repeat while "Microsoft Entourage" is in (get name of every process)
        delay 1
    end repeat
end
tell
tell application "Microsoft Database Daemon" to quit

--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the All-New Entourage Help Pages? - Check them out:
        <http://www.entourage.mvps.org/>

Reply via email to