Re: Active Application
Re: Active Application
- Subject: Re: Active Application
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 14 Mar 2003 18:33:08 -0800
On 3/14/03 1:09 AM, "John Delacour" <email@hidden> wrote:
>
At 9:06 pm -0800 13/3/03, Paul Berkowitz wrote:
>
>
> Instead,
>
> try:
>
>
>
> tell application "System Events" to name of first process whose
>
> frontmost is true
>
>
..to get the answer "System Events" ? Bit pointless isn't it :-)
Yes, if running from the OS script menu, but useful from an applet.
At one point I devised a rather Rube-Goldberg-like mechanism for keeping an
applet on the desktop or elsewhere which would tell SystemUIServer (which
used to run the script menu in OS 10.1.x) to quit, then write the name of
the "real" front app to a property of the script in the script menu which
had called it. After loading and storing the name of the front app in the
calling script's 'frontApp' property and also toggling a 'restart' property
to true, the applet would then start up SystemUIServer again, and run the
originating script, which carried on from where it had left off, toggling
the 'restart' prop to false again.
This was a lot more trouble than it was worth. I only used it about twice.
;-) I don't recommend it.
--
Paul Berkowitz
_______________________________________________
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.