Re: How to get frontmost application?
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.