• 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: Luther Fuller <email@hidden>
  • Date: Tue, 20 Feb 2007 09:33:45 -0600

On Feb 19, 2007, at 1:09 PM, Bill Briggs wrote:
I use the script below
...
But when I run it from the Mac's native scripts menu it doesn't work.

I encountered something like this with the Script Menu, but its been some time ago and I've forgotten the details. So I did a quick experiment ...


I wrote this script document, named "Frontmost_test source"

	activate me
	short name of (info for (path to frontmost application))
	tell me to display dialog the result

which I saved as a "faceless background application" named "Frontmost_test".

I put both into the User's Scripts folder. Both returned the correct frontmost application. My earlier experience with script documents in the Script Menu, if I remember correctly, was something like yours.

And another quick experiment, "Frontmost_test source" is this ...

tell application "System Events"
set fMostList to the name of every application process whose frontmost is true
end tell
activate me
tell me to display dialog (item 1 of fMostList) as text


which I saved as a "faceless background application" named "Frontmost_test".

The script "Frontmost_test source" incorrectly returns "System Events"
while the application "Frontmost_test" correctly returns the real frontmost application.


You need to save your script as a "faceless background application"; or
Avoid using 'tell application "System Events" ... '.

_______________________________________________
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
References: 
 >so what's going on here? (From: Bill Briggs <email@hidden>)

  • Prev by Date: Re: Accesing menu bar items.
  • Next by Date: Re: so what's going on here?
  • Previous by thread: Re: so what's going on here?
  • Next by thread: Accesing menu bar items.
  • Index(es):
    • Date
    • Thread