Save as application → why does a dialog appear when the app starts?

When I save a script as an application and run the app outside of SD, I get a dialog that says “Press Run to run this script or Quit to quit”.

When I create an app with the same code in Script Editor and run it, I don’t get this dialog.

Where is it possible to disable it?

Jean-Christophe Helary

File -> Application Options -> Show Startup Screen should be unchecked. A checkbox for the setting also appears in the Save dialog.

Wow, exactly the kind of places where I would not be looking…

I’m using the .app format to be able to call the script from Spotlight and I’m using that super nifty feature of late OSXs where you can disable the app menu bar display…

Also, I suppose the feature is not just here to bug newcomers, so what’s the use cases where I would need it? I mean I never called an app from Spotlight (or anywhere else) that I would not want to run, so what’s the idea?

It’s a feature of AppleScript that’s been there forever, and I guess the most common use is as a place to show instructions. If you include a description in your applet – for example, paste some styled text in the Description section of an app’s Bundle Pane – it will appear in the startup dialog.

Ok, so that default “Run or Quit” is just that, a default that helps remind us that the feature exists. Thank you Shane.

As an example, I have a script that gathers all files and folders on the desktop sorts them into folders on the drive. It’s installed on the dock on a number of macs.

It’s easy to accidentally click a dock icon, so the dialog clearly explains what’s going to happen and gives the user the option to cancel.

If you would never use it, then just turn it off. I believe it’s a persistent setting, so once you change it, all new apps saved (this only effects applets and droplets) will have the setting.

Thank you Ed. Fascinating. I try to keep everything close to the keyboard (hence spotlight to launch my things) so I would never have thought if that kind of use.

1 Like

Hi, I have just noticed that a keyboard combo (set with a free utility) control-command-Q does open my script application, but even with the “Show Startup Screen” option unchecked, I still get the startup screen. What am I missing? I tried re-saving the app, checking and then unchecking the Show Startup Screen box, and I still get it. I just want control-command-Q to run my 5-line script application like it used to (for some reason the keyboard combo started opening Automator so I had to find another solution).

Also, is there a built-in way in macOS Sierra to assign a keystroke combo to open an app, so I don’t need the free app? I see only a way to use it to choose a menu item.

It’s not what you’re missing — it’s what you are including. If an applet detects the control key is down when launching, it shows its startup screen regardless of the setting. So you need a shortcut that doesn’t include the control key.

Ah, thanks so much. I would never have guessed that. This forum is great!