• 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: How to get frontmost application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get frontmost application?


  • Subject: Re: How to get frontmost application?
  • From: Allen Watson <email@hidden>
  • Date: Fri, 08 Feb 2002 14:13:12 -0800

On or near 2/8/02 10:42 AM, Paul Berkowitz at email@hidden observed:

> On 2/8/02 10:12 AM, "Michelle Steiner" <email@hidden> wrote:
>
>> On 2/8/02 10:31 AM, Paul Berkowitz <email@hidden> wrote:
>>
>>>> But wouldn't the script's applet become the frontmost application when
>>>> it's launched? Therefore, it would not know what was frontmost just
>>>> before it was launched. Even worse, launching it would probably make the
>>>> Finder the frontmost app just before it was launched.
>>>
>>>
>>> -- not if it's running from another application's internal script menu.
>>
>> I got the impression he was talking about an applet, not a compiled
>> script. Maybe I'm wrong about that.
>>
>
> Even so, if it's a stay-open applet with an idle handler running in the
> background, it would work. Otherwise, no dice, as you say.

And, as you and I, Paul, have discussed before, in OSX, with a script run
from Script Menu, there is no way to correctly get the frontmost app. The
line you gave, in that case, returns "SystemUIServer.app", which is what
handles Script Menu, I suppose. I still very much want some way for a Script
Menu script to tell what app is (was) frontmost when I invoked it, so it can
do things like take different actions depending on what app is in front.

--
Allen Watson, Portland, OR -- <email@hidden>
My web page: <http://home.earthlink.net/~allenwatson/>
Teach only love, for that is what you are. (A Course in Miracles)
_______________________________________________
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.

  • Follow-Ups:
    • Re: How to get frontmost application?
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Subroutine that works only on the 1st run
  • Next by Date: Re: renaming files in Finder
  • Previous by thread: Re: How to get frontmost application?
  • Next by thread: Re: How to get frontmost application?
  • Index(es):
    • Date
    • Thread