Setting an applet to background only

Script Debugger 8 has a “Bundle and Export Settings” option to set an applet to background only. In a thread in MacScripter, Shane said that this option works by enabling the LSBackgroundOnly key, which Apple defines as:

LSBackgroundOnly (Boolean - macOS) specifies whether this app runs only in the background. If this key exists and is set to YES, Launch Services runs the app in the background only. You can use this key to create faceless background apps. You should also use this key if your app uses higher-level frameworks that connect to the window server, but are not intended to be visible to users. Background apps must be compiled as Mach-O executables. This option is not available for CFM apps

There is also a LSUIElement key, which is described by Apple as:

LSUIElement (Boolean - macOS) specifies whether the app runs as an agent app. If this key is set to YES, Launch Services runs the app as an agent app. Agent apps do not appear in the Dock or in the Force Quit window. Although they typically run as background apps, they can come to the foreground to present a user interface if desired. A click on a window belonging to an agent app brings that app forward to handle events.

Is there some reason I should not enable LSUIElement for an AppleScript applet where useful? Could a future version of Script Debugger add this option? Thanks.

Apart from the fact that force quitting becomes difficult, not really.

I guess it’s a question of feature bloat vs. the number of people likely to use it, and potential confusion.

Thanks for the reply. I’ll continue to use a script to set LSUIElement.