1 2 Previous Next 22 Replies Latest reply: Jun 25, 2014 6:25 AM by sergei137
Network 23 Level 6 Level 6 (11,695 points)
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
  • 1. Re: "Press Run to run this script..." confirmation started appearing...why?
    red_menace Level 6 Level 6 (14,615 points)
    I believe the setting for that dialog is in the applet.rsrc file in the Contents/Resources/ folder of the application bundle. You might check to see if there is a problem with that file - note that the Disk Utility permissions repair doesn't do anything in a user account, or with applications that aren't installed with an Apple installer (e.g. drag and drop).
  • 2. Re: "Press Run to run this script..." confirmation started appearing...why?
    Network 23 Level 6 Level 6 (11,695 points)
    red_menace wrote:
    I believe the setting for that dialog is in the applet.rsrc file in the Contents/Resources/ folder of the application bundle. You might check to see if there is a problem with that file


    Do you mean within an individual script application file? Because that wouldn't explain why all my scripts changed at once, unless something happened that affected all script applications.

    Or do you mean one of Apple's scripting utilities?

    How do I check to see if there is a problem with applet.rsrc? Which app would edit it? I did a Show Package Contents on one of my scripts and dragged applet.rsrc to TextEdit, but doesn't open as anything useful there. Probably since it's a resource.
  • 3. Re: "Press Run to run this script..." confirmation started appearing...why?
    red_menace Level 6 Level 6 (14,615 points)
    I don't know the format of the .rsrc file (you can use TextWrangler to get a hex dump), just that it is different when the options are changed and if it is not there you will get the confirmation dialog. I was thinking that if there was some kind of corruption or you couldn't read the file it would act the same way. If a new blank script application does the same thing, you might try from a new user account to see if it is something in your user preferences vs the system.
  • 4. Re: "Press Run to run this script..." confirmation started appearing...why?
    Network 23 Level 6 Level 6 (11,695 points)
    I haven't solved it yet but thanks for your ideas, I'll try the different account or I'll copy the scripts to my other Mac and see if it happens there too.
  • 5. Re: "Press Run to run this script..." confirmation started appearing...why?
    osimp Level 1 Level 1 (120 points)
    You're dealing with scripts saved as applications, correct?
    I've encountered this issue in a somewhat different context, and I suspect that red_menace is correct that it has to do with the .rsrc file in the resources folder -- but I haven't figured out a "direct" fix.

    No guarantees, but try this:

    • Display the main script on the desktop by dragging the applet to whatever script editor you are using.

    • From the script editor menu (top of screen) select "file > save as." You'll get a drop down window over the script, showing the name of the original applet (without the name extension ".app"). Leave the name alone or change it as you wish. In any event, save the "save as" script as an application bundle in the same location as the original applet (e.g., desktop). If you didn't change the name, you'll have to choose to replace the original applet with the "save as" version; if you did change the name, you'll retain the original and get another with the new name.

    • At this point, double-click on the applet with the new name (if that's the approach you took); otherwise, double-click on the replacement applet. Do you still get the "Press Run to run this script..." message??

    As I said, no guarantees, but I'll be most interested in what you find.
  • 6. Re: "Press Run to run this script..." confirmation started appearing...why?
    Network 23 Level 6 Level 6 (11,695 points)
    I did try resaving them to ensure that the option was off, but that made no difference...it still came up even though I verified and re-saved.

    Even more mysteriously...the problem has gone away. I never saw it before, then it happened for about a week, and now it's gone away. It's back to working normally, I can run scripts without interruption. And in all that time, I never restarted the Mac or even logged out. The problem somehow appeared and then, after a time, disappeared on its own.

    Maybe there was a system process that got corrupted while running and was interfering, and over the course of my uptime the errant process was either terminated or restarted. We may never know for sure.

    Very strange.
  • 7. Re: "Press Run to run this script..." confirmation started appearing...why?
    osimp Level 1 Level 1 (120 points)
    Very strange indeed.
  • 8. Re: "Press Run to run this script..." confirmation started appearing...why?
    walkie84 Level 1 Level 1 (0 points)
    I am having this exact same problem. I just (finally) updated to 10.6.5 yesterday, so I'm suspicious that this is the cause. Like the OP, all of my applescripts now pop-up this dialog. I have tried re-saving them, ensuring that the "Startup Screen" is not selected, but this has not fixed the problem.
  • 9. Re: "Press Run to run this script..." confirmation started appearing...why?
    Network 23 Level 6 Level 6 (11,695 points)
    walkie84 wrote:
    I am having this exact same problem. I just (finally) updated to 10.6.5 yesterday, so I'm suspicious that this is the cause.


    I was running 10.6.5 for weeks before the problem started. That's what's so mysterious. There is no direct cause and effect except that I never saw this problem before 10.6.5.

    I noticed other odd things happening and most seemed to clear up after I ran the 10.6.5 combo updater again, but I'm pretty sure this specific AppleScript problem stopped on its own before I re-ran the combo. Still a mystery.
  • 10. Re: "Press Run to run this script..." confirmation started appearing...why?
    red_menace Level 6 Level 6 (14,615 points)
    You might try creating a new account and see if the behavior continues there. This may indicate a system vs user issue.
  • 11. Re: "Press Run to run this script..." confirmation started appearing...why?
    jeremynk Level 1 Level 1 (0 points)
    Hi there,

    Just following this up to see if there was a solution? I have the exact save problem - intermittently and seemingly without any direct cause. Any luck?

    Thanks
  • 12. Re: "Press Run to run this script..." confirmation started appearing...why?
    Barry Margolin Level 2 Level 2 (430 points)
    This just started for me, too. I have a script in my non-admin account that I've been using for over a year, and today it started popping up this dialogue. I tried re-saving it and making sure the Startup Screen option is unchecked, but it didn't help.

    I have an almost identical script in my admin account, and it doesn't do this.
  • 13. Re: "Press Run to run this script..." confirmation started appearing...why?
    Barry Margolin Level 2 Level 2 (430 points)
    I just installed the 10.6.7 update and the prompt went away. I don't know if it was because of the update or just the reboot.
  • 14. Re: "Press Run to run this script..." confirmation started appearing...why?
    fedeboraxx Level 1 Level 1 (0 points)

    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

1 2 Previous Next