I am trying to run an Applescript, but when I double-click it, it tries to open Applescript editor and informs me that it was saved as "run only". This is fine -- I just want to run it!

The script in question comes from here.

I did not write the script, I just want to run it. Looking at it with Textwrangler, I can see there are perl files and config XML files in it. The exact message I get when double clicking is, Unable to read the file because the script is not editable (it was saved as run-only).

I have tried using chmod to set it to executable, with no luck.

  • It is not saved as an .app it is saved as a script Bundle. (.scptd ) Do as @Lri says and put it in the User Script folder and enable the Applescript Menu – markhunte Jan 30 '12 at 22:26
  • @markhunte Normal scpt files can be run-only as well. But yeah, they can always be run from the script menu, with osascript, or using a launcher. – Lri Jan 31 '12 at 13:33
  • @Lri Yes I know!, But my point is double clicking a .scptd (scptd, the d is not a typo)file will open it in AppleScript Editor. It is a bundle class, not an applet class. Script Bundles are for storing resources for the script in the same way a app. does. But they do not run from a double click. Thats why I am saying your answer is correct. – markhunte Jan 31 '12 at 17:15

You could run it from the script menu by putting the script in ~/Library/Scripts/ and checking Show Script menu in menu bar in AppleScript Editor's preferences.

  • This is the correct answer, Don't double click it.Run it from the menu – markhunte Jan 30 '12 at 22:22
  • Yes this worked! (At least the script ran. Unfortunately the error messages and documentation for it are terrible, so I can't figure out what it wants in DevonThink, but at least the script ran. Thanks!) – Stan James Jan 31 '12 at 22:34

Does the script have an .scpt extension on it? For run only, the script is saved as an application; it should have an .app extension. When it has the wrong extension, you get exactly the error message you describe. You need to change the file name extension. The finder can be picky about changing extensions, so choose 'get info' on the file, and type in 'thefilename.app' in the "name and extension" field of the window. Close the window, and wait for the Finder to figure out you've changed the name (takes a few seconds), then double click on the App, and it should run properly for you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .