• 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: Frontmost Application Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frontmost Application Problem


  • Subject: Re: Frontmost Application Problem
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 24 Apr 2008 11:43:54 -0500

I wrote a quick little project to test this ...

	tell me
		activate
		display dialog "TEST"
	end tell

And I supplied the project with LSBackgroundOnly = yes in addition to LSUIElement = yes.
I ran the compiled application. A long pause, then the following dialog appeared ...


	No user interaction allowed.	[OK]

And the funny thing is ... it's true. Self referentially! I had to go to Activity Monitor to kill the dialog. The good news is that I can replace 'me' with 'application "anything"' and get a usable dialog.

On Apr 24, 2008, at 11:07 AM, Christopher Nebel wrote:
On Apr 24, 2008, at 5:51 AM, Luther Fuller wrote:

Yes, I'm using Tiger. (I'll be using Leopard tomorrow.) My script compiling script compiles an application bundle with Script Editor, then sets the value of LSUIElement in the Info.plist file. I do not use LSBackgroundOnly.

I have just reread the definitions in BPRuntimeConfig.pdf and I'm not sure, but I don't think I should be using LSBackgroundOnly. My faceless applications usually need to 'display dialog ...'. Perhaps you can clarify.

I wasn't saying that LSUIElement was wrong, just that it's not the same thing as LSBackgroundOnly. I actually try to avoid the term "faceless" these days because of the ambiguity between "UI element" and "background only". An LSUIElement application has no menu bar, but can still present UI, such as a "display dialog", and can be activated. An LSBackgroundOnly application has no UI whatsoever: telling it "display dialog" will fail, and activating it does nothing.


Since you really do want to present dialogs, LSUIElement is correct (or at least not incorrect). An alternative would be to make it background-only and tell some other application to display your dialogs for you, such as System Events or Growl.
_______________________________________________
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/archives/applescript-users

This email sent to email@hidden
References: 
 >Frontmost Application Problem (From: Luther Fuller <email@hidden>)
 >Re: Frontmost Application Problem (From: Christopher Nebel <email@hidden>)
 >Re: Frontmost Application Problem (From: Luther Fuller <email@hidden>)
 >Re: Frontmost Application Problem (From: Christopher Nebel <email@hidden>)

  • Prev by Date: the odd case of the disappearing Eudora dictionary
  • Next by Date: choose from list re-visited - again
  • Previous by thread: Re: Frontmost Application Problem
  • Next by thread: Re: Frontmost Application Problem
  • Index(es):
    • Date
    • Thread