Skip to main content
Solved

Hide Applescript Prompt


amccarty
Forum|alt.badge.img+7

I've exported an Apple script as a .app file which mounts network shares and runs constantly in the background. I've got a launch agent for the app with keep alive set, and in the info.plist file for the app i've set LSUIElement so that it's always hidden.

That's all worked great, however, if a user holds down the control key while the script is running a prompt will appear with the app name asking if you want to run or quit the script:

Does anyone know a way of preventing that? I'm sure it's probably something very simple but I can't seem to find anything about the control key causing this prompt for silent apps.

Note: I'm sure someone will probably suggest using NoMad instead for share mounting, so I should probably mention here we have previously used NoMad and had a number of issues with it and eventually moved away from it in favour of this method, it just works better for us!

Thanks!

Best answer by ryan_ball

@amccarty Is the .app created with Automater? If so have you tried Platypus to see if that acts any differently? You can easily create a .app with Platypus from a script that might act differently.

View original
Did this topic help you find an answer to your question?

7 replies

Forum|alt.badge.img+18
  • Contributor
  • 475 replies
  • Answer
  • April 4, 2019

@amccarty Is the .app created with Automater? If so have you tried Platypus to see if that acts any differently? You can easily create a .app with Platypus from a script that might act differently.


amccarty
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 15 replies
  • April 4, 2019

@ryan.ball Nope not Automator, I've just created it with the built in "Script Editor". Never used Platypus but i'll try exporting it from there and see if I get the same behaviour.


amccarty
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 15 replies
  • April 4, 2019

@ryan.ball Tried it, and you were right I don't get the prompts any more after using Platypus to create the script. Thanks! Will definitely be using Platypus more going forward, it saves a lot of time having to manually tweak the contents of .app files.


Forum|alt.badge.img+10
  • Valued Contributor
  • 55 replies
  • April 4, 2019

@amccarty When you export your script as an application from Script Editor there should be a checkbox labeled "Show startup screen." Is that unchecked for your script?

Also, if you're doing much with AppleScript I would highly recommend using Script Debugger from Late Night Software instead of Script Editor. Even the free version of SD is lightyears ahead of Script Editor.


Forum|alt.badge.img+18
  • Contributor
  • 475 replies
  • April 4, 2019

@amccarty Great! You can also save profiles for specific projects in Platypus, so that you don't have to redo the settings over and over if/when you make changes to the script. Good luck with it!


amccarty
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 15 replies
  • April 4, 2019

@isaacnelson Yeah that was unchecked, it wasn't showing every time the script started just on holding control down for a few seconds, but I think i'm good now it seems to be ok after re-exporting without using Script Editor. Thanks, I'll have a look at the debugger too i'm sure it'll be of use at some point.


Forum|alt.badge.img+10
  • Valued Contributor
  • 55 replies
  • April 4, 2019

Very strange. Glad you've got it working now. Platypus is a great tool, too!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings