1

Today, I was working on an .scpt file in Script Editor.app, when, suddenly, Script Editor would not allow me to save the file. It was a seemingly random occurrence; I had not done something unique when the error surfaced. I had successfully saved this file in Script Editor dozens of times today.

I then Quit Script Editor and double-clicked on the .scpt file in Finder, to open the file in Script Editor (which is my default application for .scpt files).

Script Editor responded with the following error dialog:

Error dialog

It reads:

The document "My script.scpt" could not be opened.

I can launch Script Editor and I can create a New Document. But, I cannot open an existing document.


What I've tried:

  • Restarting and shutting down the computer

  • Running "First Aid' in Disk Utility.app

  • Opening Script Editor.app via the right-click context menu in Finder

  • Opening a .scpt file via the menu bar in Script Editor (FileOpen...)

  • Opening a .scpt file via the right-click context menu in Finder

  • Creating a new document in Script Editor that contains zero characters. I can successfully save new documents in Script Editor, so I saved this .scpt file to my Desktop. But, after I closed the document window, I could not open the document in Script Editor.

  • All of my .scpt files originated in (i.e., were created by) Script Editor.

  • It may be important to note that I could open the .scpt files in TextWrangler.app and Atom.app.


Here is the Sharing & Permissions pane for the app file (via Get Info window in Finder):


These two questions are similar to my own:

However, the solutions do not apply to my scenario.


Short of re-installing the OS, is there anything that I can do to get Script Editor up and running again?

OS X El Capitan, version 10.11.6.

Script Editor Version 2.8.1 (183.1)

2

Personally if it was me, I would run disk utility app on my system first.. Then I would reboot and see if that fixes the problem. If that did not fix the problem, I would then go to /Users/your short name/Library/Preferences/com.apple.ScriptEditor2.plist. <—- and delete that .plist file, then reboot and fire up the script editor app to see if the problem is fixed. You may want to make a backup copy of that plist file before you delete It.

I'm not quite sure if that file is hidden in the system, So you may have to unhide hidden files before you can find that plist file

This is the script I use to show hidden files in the system...

do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE\nkillall Finder"

An alternate solution would be trying to restore that .plist file using Time Machine

5
  • I've already run "First Aid' in Disk Utility.app, as I mentioned. Can you explain what you mean by, "run disk utility app"? May 27 '17 at 16:24
  • you already tried that solution… I posted that part of my answer without seeing the fact that you tried that already… Disk utility
    – wch1zpink
    May 27 '17 at 16:26
  • OK. Deleting the com.apple.ScriptEditor2.plist file has allowed me to open .scpt files in Script Editor again. Thanks for the tip! But, a new issue has surfaced. I've detailed this issue in a new post: When using a third-party script library, I can no longer save an AppleScript file in Script Editor.app May 27 '17 at 19:50
  • Thanks for this. Looks like the plist get regenerated, Have you figured out what params in the list are the culprits for this?
    – Jiraheta
    Jun 9 at 22:47
  • @Jiraheta No I have not figured out what the culprits were. I very rarely use Script Editor these days so diving in any deeper would be pretty much a waste of my time. I use Script Debugger almost exclusively.
    – wch1zpink
    Jun 10 at 15:47

You must log in to answer this question.

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