• 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: Jon Pugh <email@hidden>
  • Date: Tue, 31 Jul 2001 09:48:24 -0700

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


References: 
 >Getting front app (From: Phil Calvert <email@hidden>)

  • Prev by Date: Re: set variable to pict file contents? Set file icon to variable?
  • Next by Date: Re: Read/Write 'as short' and 'write "" starting at'
  • Previous by thread: Getting front app
  • Next by thread: Script Applet rejects first handler call
  • Index(es):
    • Date
    • Thread