• 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: so what's going on here?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: so what's going on here?
      • From: Bill Briggs <email@hidden>
References: 
 >so what's going on here? (From: Bill Briggs <email@hidden>)

  • Prev by Date: RE: Converting Pounds Prices to Euro Prices
  • Next by Date: RE: Converting Pounds Prices to Euro Prices
  • Previous by thread: so what's going on here?
  • Next by thread: Re: so what's going on here?
  • Index(es):
    • Date
    • Thread