Re: so what's going on here?
Re: so what's going on here?
- Subject: Re: so what's going on here?
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 19 Feb 2007 11:36:42 -0800
- Thread-topic: so what's going on here?
Title: Re: so what's going on here?
On 2/19/07 11:09 AM, "Bill Briggs" <email@hidden> wrote:
The interesting thing is this. When I run this script via TypeIt4Me (it now has the ability to run AppleScripts, which is great) it works on any application that will allow one to resize a window. The front window of the frontmost application gets fixed, just as I want it to. When run from the FastScripts menu it also works as expected.
But when I run it from the Mac's native scripts menu it doesn't work. After a bit of tinkering and testing I've noticed that it seems to think that System Events is the frontmost application. But given that System Events isn't even visible, that doesn't make any sense either.
Anyone vote for a bug here? It's not making any sense to me.
System Events is what's running the OS script menu itself. So it is the frontmost process, although not visible.
However, in Tiger, 'path to frontmost application' (the 'path to' scripting addition) is "smart" and ignores the script menu and System Events running it, instead returning the "otherwise" (i.e. intuitive) frontmost app, the one you want. So get that instead. Since you can use the whole file path when targeting an application, there's no need to parse it for just the name.
set fMostAp to (path to frontmost application) as Unicode text
should do what you want.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden