Re: close all programs
Re: close all programs
- Subject: Re: close all programs
- From: Rob Jorgensen <email@hidden>
- Date: Fri, 28 Mar 2003 15:46:01 -0500
At 12:00 PM -0800 3/28/03, Andrew Oliver wrote:
On 3/28/03 11:21 AM, "Marc K. Myers" <email@hidden> wrote:
This seems to do the job. The conditional with the list excludes apps
you don't want to close. If you really want to close everything it can
be omitted.
tell application "Finder"
...
Not under Mac OS X
Ignoring for the moment the original poster's problems targetting 'System
Events', 'System Events' is the app to target for this kind of task. Under
Mac OS X the Finder might not be active and your script will fail.
Under earlier versions of the Mac OS, you could be sure the Finder was
running since that was the core interface. Not so in X where the Finder is
just another application trying to do its job (which is to provide a UI to
the file system)
If you look at the Finder's dictionary (at least in 10.2.4), you'll notice
that the 'application' object is under the 'Legacy' suite.
It might be in the legacy suite (I think it just hands the commands
off to System Events) but I just ran a script to quit Finder and then
ran Marc's script successfully. As soon as Marc's script called the
Finder, it launched and went on about its business. Tested with OS X
10.2.4.
I know that it is probably advisable to use System Events for the
sake of forward compatibility but I don't think that it's a deal
killer just yet. <shrug>
--
Rob Jorgensen
Ohio, USA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.