• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting front app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Getting front app
      • From: Jon Pugh <email@hidden>
  • Prev by Date: Re: Quark section starts
  • Next by Date: Re: Quark Section Starts
  • Previous by thread: How do I remove a resource fork?
  • Next by thread: Re: Getting front app
  • Index(es):
    • Date
    • Thread