Re: path to frontmost application as text but another way...
Re: path to frontmost application as text but another way...
- Subject: Re: path to frontmost application as text but another way...
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 23 Jul 2002 22:34:01 -0700
On 7/23/02 10:13 PM, "Cornwall" <email@hidden> wrote:
>
At 7:15 PM -0700 7/23/02, Paul Berkowitz wrote:
>
>
> And it also doesn't seem to be working in OS 10.1.5/AS 1.8.3! 'every process
>
> whose frontmost is true' just keeps hanging. In Script Editor you can't even
>
> stop the script, and have to force-quit. In script Debugger you can stop it.
>
>
>
> Confirmation?
>
>
This works with OS 10.1.5/AS 1.8.3.
>
>
tell application "Finder"
>
application file of every process whose frontmost is true
>
end tell
>
So does 'name of every process whose frontmost is true' (eventually). It
looks like all the properties work, just not the list itself. last version
of AS, 'first process whose frontmost is true' was a list! Now we can't get
either 'first' or 'every'. 'name of first process whose frontmost is true '
is still a list. I guess 'Legacy terms' means "doesn't always work"? I
suppose you can always get the name, then get the process by name.
Nope:
tell application "Finder"
name of first process whose frontmost is true
application (item 1 of result)
end tell
ERROR: 'Can't get application "Script Debugger".'
Oh no? You just did.
tell application "Finder"
application file of (item 1 of (first process whose frontmost is true))
as string
application result
end tell
Finder got an error: NSReceiverEvaluationScriptError: 3
tell application "Finder"
set pathName to application file of (every process whose frontmost is
true) as string
end tell
application pathName
-- application "Script Debugger"
At last. As Paul discovered, some of the coercions work, but not the real
code. OS X has now been out 1 year and 4 months. It seems to me that basic
things like this should be working by now. Let's see what August 24 brings -
I'm sure there will be improvements. Will they include fixes to Finder bugs,
or will OS X continue the tradition it was invented to overcome, I wonder.
--
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.