• 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: Display Dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display Dialog


  • Subject: Re: Display Dialog
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 21 Sep 2001 12:57:58 -0700

On 9/21/01 12:37 PM, "Mr Tea" <email@hidden> wrote:

> set theFrontApp to name of (every process whose frontmost is true) of
> application "Finder" -- [all one line]

Not so great, Mr. Tea, under one condition. 'every process' is a list - of
one item - so it's getting coerced OK to the string which is its single
item. But if you try this in a an applet (it's easiest if you use a
stay-open applet with an idle handler returning every 10 seconds or so),
then put the Finder itself in front, you should get an error. (Without an
idle handler, you can't do this, since double-clicking the applet will
always put the applet itself in front so you can't test for the Finder.) The
Finder doesn't consider itself to be a process, so (every process whose
frontmost is true) is {} and

name of {}
--> ERROR

(path to frontmost application as string)

won't error, and will give you the application file , which works just fine
in a 'tell application' construct.

--
Paul Berkowitz


References: 
 >Re: Display Dialog (From: Mr Tea <email@hidden>)

  • Prev by Date: Re: Display Dialog (addendum)
  • Next by Date: Re: Display Dialog
  • Previous by thread: Re: Display Dialog
  • Next by thread: Re: Display Dialog
  • Index(es):
    • Date
    • Thread