Re: Tell Launcher to quit
Re: Tell Launcher to quit
- Subject: Re: Tell Launcher to quit
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 24 Dec 2000 10:07:08 -0800
On 12/24/00 9:19 AM, "Hans Haesler" <email@hidden> wrote:
>
> Yes, but it's not a Finder window. The Finder doesn't know anything about.
>
> Try asking the Finder to close a window of any other application and you'll
>
> get the same error.
>
>
Let's see. When I run this...
>
---
>
tell application "Finder"
>
close window "Document1" of application "QuarkXPress 4.11"
>
end tell
>
---
>
... I don't get an error.
>
Just a dialog which asks:"Save the new document "Document1"?"
No, no. That's not what I meant. Sorry for not being excruciatingly
explicit. What I meant is the obvious fact that you can't write:
tell application "Finder"
close window "Document1"
end tell
when window "Document1" belongs to another application. That's so obvious
that it didn't even occur to you as a possibility, right? But another
contributor, I thought, had said that you _could_ write
tell application "Finder"
close window "Launcher"
end tell
even though window "Launcher" belongs to the Launcher desk application, not
to the Finder. Perhaps I misunderstood the writer.
When I checked myself in OS 9.0.4 (US), using the same
tell application "Finder" to get windows
that you used in 8.6 French, I did _not_ get
window "Launcher" of file "Launcher" of folder "Control Panels" of
folder "System Folder" of startup disk of application "Finder"
nor would I expect to. There's no such window in the Finder in OS 9. That
must have been a bug, or at least a terrible implementation of the Finder's
AppleScripting in OS 8.6 (and earlier, anyone)? I mean, it's just completely
wrong. How can you have a window of a file? It's totally against the object
model: Finder files simply don't have windows: look at the Finder
dictionary. Neither "file" nor "desk accessory file" has any such property
or element. It's a good thing it was removed. But why wasn't it replaced
with some way to quit the Launcher? That's equally terrible. I imagine it's
because Apple stopped all development of the Launcher and won't be using it
in OS X, as I believe I heard. That's not a good excuse, however, as long as
they maintained the Launcher in OS 9.
Basically, what they've done is replace bad scriptability of the Launcher
(messing up the Finder's scripting) with NO scriptability of the Launcher.
Since some other Apple control panels also aren't scriptable, that's not
unique. Someone wrote here that the Launcher's 'has scripting terminology'
read as 'true', I believe, but that's not so in OS 9.0.4:
tell application "Finder" to get has scripting terminology of process
"Launcher"
-- false
tell application "Finder" to get accepts high level events of process
"Launcher"
-- true
Still, if it 'accepts high level events', it should quit, which it doesn't.
This seems to be quite a mess.
Chris Nebel - do you care to comment? Or Cal?
--
Paul Berkowitz