You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"Press Run to run this script..." confirmation started appearing...why?

I've got a set of AppleScripts I run from Spotlight, and all of a sudden they run with a confirmation alert that I've never seen before. Upon launch, each of these scripts puts up an alert that says "Press Run to run this script, or Quit to quit." So I gotta hit a button before the script will continue running.

I did a web search on it, and they all said the same thing: You saved your script with the Startup Screen option on. But I didn't! They've been running headless for months, some for years, and none of them started displaying the confirm dialog until now. I even opened and resaved them with the Startup Screen option off (it wasn't even checked when I went to resave them) and they still do this.

I guess I'll try fixing permissions unless somebody has a better idea. As far as I can tell, I've done everything right.

Mac Pro, MacBook Pro, iPhone 3GS, Mac OS X (10.6.5), PowerBook G4 15" Al, PowerBook G3 FireWire, PowerCenter Pro, PowerBook 160

Posted on Nov 26, 2010 11:23 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 3, 2011 5:24 AM

Well just in case anyone is still wondering about this, I think I figured it out. Make sure whatever app you're using to trigger the script (Alfred in my case) does not use the CONTROL Key as part of the keyboard shortcut. That fixed it for me

23 replies

Jul 7, 2011 8:24 PM in response to Network 23

Incase anyone was still stuck, this seems to be controlled by the "spsh" resource in the .rsrc file in the application bundle. If the second bit of that resource is "01" then the dialog will show, if it's "00" it wont. Also keep in mind that the executable's name in the MacOS directory must be the same as the .rsrc file or none of the settings in there will matter. Usually this is "applet", however I'd check to be sure.


If there is something preventing access to this file, such as a permission conflict, it will act as if the file is not there. It's possible that some random program you have messed the permissions up on the .rsrc files, causing this to happen. Rather long shot, but it's all I can think of. You can try running "sudo chown $USER applet.rsrc" and then "chmod +rw applet.rsrc". If that doesn't do it, then I'm all out of ideas.

Jul 30, 2013 5:37 AM in response to res1233

I had this problem today with a script which had previously "just worked." Strangely, if AppleScript Editor were open, it worked fine. Close ASE, it doesn't.


I looked at the permissions on the applet.rsrc file and noticed that it wasn't marked as executable, so I added the "x" permission to it for everybody, and that solved the problem.


In terminal, change directories to the applet's Resources folder and then do:


chmod +x applet.rsrc


Hope this fixes the problem for somebody else, too.

"Press Run to run this script..." confirmation started appearing...why?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.