Re: Getting front app
Re: Getting front app
- Subject: Re: Getting front app
- From: Phil Calvert <email@hidden>
- Date: Thu, 02 Aug 2001 07:16:08 -0700
Hello, and thank you for the reply,
When I try your suggestion I kept getting the path to the script app--not
the app that I was hoping for (e.g. Not the app that the user is using right
before the launch of the script from the f-key). This is my code right now.
tell application "Finder"
set ActiveApp to <opt-L>
(application file of processes whose frontmost is true) as alias
end tell
display dialog ActiveApp
Any hints?
on 7/31/01 10:36 AM, Jon Pugh <email@hidden> wrote:
>
>
At 8:05 AM -0700 7/31/2001, Phil Calvert wrote:
>
> I'm trying to get the finder to tell me what application is at the front
>
> (and is not a faceless background app). This is what I came up with.
>
>
>
> tell application "Finder"
>
> set ActiveApp to name of front application process whose visible is true
>
> end tell
>
>
tell application "Finder"
>
set activeApp to (application file of processes whose frontmost is true) as
>
alias
>
end tell
>
>
Watch for digest wrapping on that single line above. This makes activeApp be
>
an alias. You can ask for the name instead if you really want.
>
>
Jon