Cannot open file because it does not appear to be a script


I have an AppleScript app that I’ve been tinkering with for years and years, but which I haven’t modified for a while. When I tried to open it today in SD, I got the “cannot open file” message. The script runs, and main.scpt opens and saves in SD.

When I’ve had this error in the past, I simply copied main.scpt into a new AppleScript application, then copied all the Resources (lots of files and other scripts) from the uneditable one into the new one. But is there any way to repair the existing application so that I can continue to edit it, with recreating it?

(Shane Stanley) #2

Can you post a screenshot of the error dialog you’re getting?


Here it is, with the offending app next to it:


(Shane Stanley) #4

Have you tried adding an extension? Could you email me the file to have a look?


Here’s the download link - it’s an appalling set of kludges for converting old WordPerfect files into RTF format. I found an old copy that opened correctly in SD, but this one doesn’t:

Don’t be too appalled by the scripting. I was even more of a beginner when I put this together than I am now (and I’m still a beginner).

(Shane Stanley) #6

That behaves fine here, although it doesn’t show the icon. And the mod date is in the past week, so I wonder if it’s the wrong version.


Shane - Argh! You’re right. I wasted your time by sending you a link to the version that I post in public at The one that isn’t opening in Script Debugger is here (not yet public):

I finally noticed the problem with the public one that it doesn’t display the icon. I’m scratching my head over that one…

This may not be worth any trouble unless it might be useful for finding problems. I can easily rebuild the application.

(Shane Stanley) #8

So the problem here is that you changed the Info.plist entry for CFBundleSignature. As that’s neither aplt nor dplt, SD sees it as a foreign app. You really shouldn’t change that value; it was only for pre-OS X anyway.


Aha! I remember adding that value because I thought I should add it - and obviously made a mistake in doing so. Apologies again for wasting your time with my mistakes - and a few thousand thanks for your patience and helpfulness in all this. I’ve been making (I hope) good use of your recent advice in a few projects that I’ve wanted to put together for a long tim.e

(Shane Stanley) #10

If all you want to do is change the icon, use the Resources Tab of Script Debugger.


Thanks to your help, it’s all sorted out and updated (getting rid of obsolete features like cupsfilter, which no longer creates PDF files - though your PDF-creating script does exactly that).