On 10/9/09 4:36 AM, "Corentin Cras-Méneur" <[email protected]> wrote:

[quoting omitted for clarity]

#!/bin/bash

echo "Quitting Entourage"
killall "Microsoft Entourage"
echo "Quitting the Database Daemon"
killall "Microsoft Database Daemon"
echo "Quitting the Office reminders"
killall "Microsoft Office Reminders"
echo "Quitting My Day"
killall "My Day"
echo "Quitting Word"
killall "Microsoft Word"
echo "Quitting Excel"
killall "Microsoft Excel"
echo "Quitting PowerPoint"
killall "Microsoft PowerPoint"
echo "Quitting Messenger"
killall "Microsoft Messenger"
echo "Quitting Yojimbo"
killall "Yojimbo"
echo ³Done²

Corentin,

I think this is a case where AppleScript may be the preferred solution.
There are two problems with the killall command.  First, it will immediately
and unconditionally kill an application.  If an application has open,
unsaved documents, it will be killed without giving you a prompt to save.
Your data will be lost.  Second, if the killall is issued for an application
that is not open, an error is generated:

No matching processes belonging to you were found

If SuperDuper runs a script and gets this error, it will stop, and the
backup will not complete.

We do not have either of these problems if we use AppleScript commands from
within the shell script, with syntax of this form:

osascript -e 'tell application "Microsoft Entourage" to quit'

etc. 

-- 
Julian Vrieslander <[email protected]>


--
YouTalk mailing list
List address: [email protected]
List information: http://entourage.mvps.org/support_options/list.html
List moderator: [email protected], [email protected]
To unsubscribe: mailto:[email protected]?subject=unsubscribe

Reply via email to