Re: close all programs
Re: close all programs
- Subject: Re: close all programs
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 28 Mar 2003 12:49:52 -0800
On 3/28/03 12:00 PM, "Andrew Oliver" <email@hidden> 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.
That's not so. If the Finder is not active then 'tell application "Finder"
will simply launch it again (as everyone knows who has tried to quit an
application that's not open: first it opens again, then it quits).
>
>
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.
All that means is that new commands assigned to System Events won't work
with the Finder, but all the old commands now actually performed by System
Events will still work if targeted to the Finder.
All that said, it does make more sense to tell System Events in OS X because
you'll get a faster response and - who knows - maybe someday the Finder will
stop doing some of these things. the exception is if your script is meant to
work in both OS 8/9 and X. The you should use the Finder.
None of this helps Jurgen, of course, with his unscriptable System Events.
Which version of OS X, Jurgen?
--
Paul Berkowitz
_______________________________________________
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.