Script Editor unable to open scripts

Script Editor has become non-functional. I can't open a New Window. When I try to open an old Untitled window I simply get the spinning gear.



I rebooted in Safe Mode. The problem persisted. I then rebooted in Safe Mode using a test account. That seemed to work OK. Other than reinstalling my system — Ventura 13.6.9 — is there anything I can do?


iMac 27″ 5K, macOS 13.6

Posted on Sep 6, 2024 5:05 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 7, 2024 12:18 PM

Press and hold the shift key while launching Script Editor. This will prevent Script Editor from accessing its previously saved last application execution state. You should only use this approach when Script Editor has previously crashed, hung, or is misbehaving as you depict. Seeing an AppleScript command appearing where you should only be able to click and see AppleScript or JavaScript choices is troubling.


At this point, it should present a file chooser. Set it to your Desktop, and then click the New Document button at the bottom of that dialog.

Similar questions

10 replies
Question marked as Top-ranking reply

Sep 7, 2024 12:18 PM in response to Cary Wolfson

Press and hold the shift key while launching Script Editor. This will prevent Script Editor from accessing its previously saved last application execution state. You should only use this approach when Script Editor has previously crashed, hung, or is misbehaving as you depict. Seeing an AppleScript command appearing where you should only be able to click and see AppleScript or JavaScript choices is troubling.


At this point, it should present a file chooser. Set it to your Desktop, and then click the New Document button at the bottom of that dialog.

Sep 7, 2024 3:49 PM in response to Cary Wolfson

CleanMyMac is one of the worse apps for messing up a system and applications. It's been the cause of literally 100's of posts where removing the app and its many insidious support files solved the problem.


So, I recommend uninstalling CMM according to the developer's instructions. Then use the shareware app Find Any File to search for any of CMM's supporting files.


For CMM software you'd do the following search(es): 


1 - Name contains cleanmymac

2 - Name contains macpaw


Any files that are found can be Option dragged from the search results window to the Desktop to get a copy of the file.


FAF can search areas that Spotlight can't like invisible folders, system folders and packages.  


Any files that are found can be dragged from the search results window to the Desktop or Trash bin in the Dock for deletion.


If you get warnings that the file can't be deleted because it is in use or used by another app boot into Safe Mode according to How to use safe mode on your Mac and delete from there.


Note:  if you have a wireless keyboard with rechargeable batteries connect it with its charging cable before booting into Safe Mode.  This makes it act as a wired keyboard as will assure a successful boot into Safe Mode.


Sep 8, 2024 11:41 AM in response to Cary Wolfson

Matti Haveri wrote:

Cary Wolfson wrote:

Did all that. Restarted. No change. Grrrrr.
Maybe CleanMyMac has corrupted the system so badly that the fix is to re-install macOS on top of the old system, or if that does not do it, backup, erase and cleanly re-install macOS.


I can confirm that actually using the aforementioned "cleaning" product is capable of corrupting a Mac so badly the an erase and reinstall is the most expedient solution, if not absolutely required.


Removing "CleanMyMac", even if you follow its instructions to the letter, will not undo the damage it is capable of inflicting. Removing any of its related components won't help either. Reinstalling macOS has never helped in such circumstances. Erasing the affected Mac is what I usually do. It saves time. It is very unlikely that Script Editor is the only affected app. You're going to encounter continual, apparently unrelated troubles until erasing the Mac and rebuilding it from the ground up.


Rule 1 of Macs is don't install junk.

Sep 7, 2024 9:53 AM in response to Cary Wolfson

Have you installed and run any "cleaning", "optimizing", "speed-up", anti-virus or VPN apps on your Mac?


Give this a try: boot into Safe Mode according to How to use safe mode on your Mac and test to see if the problem persists. Reboot normally and test again.


NOTE 1: Safe Mode boot can take up to 3 - 5 minutes as it's doing the following; 

• Verifies your startup disk and attempts to repair directory issues, if needed

• Loads only required kernel extensions (prevents 3rd party kernel/extensions from loading)

• Prevents Startup Items and Login Items from opening automatically

• Disables user-installed fonts 

• Deletes font caches, kernel cache, and other system cache files


NOTE 2: if you have a wireless keyboard with rechargeable batteries connect it with its charging cable before booting into Safe Mode. This makes it act as a wired keyboard as will insure a successful boot into Safe Mode.




Sep 8, 2024 12:36 AM in response to Cary Wolfson

I would not rule out Matti Haveri's observation as CleanMyMac has burned others over the last few years.


Before you do that though…


Formally quit Script Editor with a ⌘Q


In the Finder, press shift+cmd+G to open the Go to Folder panel. Copy and paste the following into that dialog, followed by a return:

~/Library/Preferences


That will open a new Finder Window on the preceding Preferences folder where you locate and move to your Desktop, the following items that may exist:



Close that Finder Window. And once more, press shift+cmd+G to open the Go To Folder dialog and copy/paste the following end with a return:

~/Library/Saved Application State


In that new Finder Window opened on that location, look for and move to the Trash, the following folder (or any with the ScriptEditor name in it:



Empty the Trash and then shut down the Mac and then power it back on. Once you have the Desktop back, press and hold the shift key while launching Script Editor. Any change? If it is working as expected, you can move those .plist files you previously moved to the Desktop — to the Trash and empty it.



Sep 7, 2024 1:02 PM in response to VikingOSX

Here's an update on this issue. I spent quite a bit of time with Apple support yesterday, but still found no resolution. While Script Editor no longer hangs, it still doesn't apply my script. I have tried to Shift-open Script Editor. No change. I have reinstalled my system — Ventura 13.6.9. No change. What we DID discover that could be a root cause is that in the app's Settings there is no default language. I should have the options of either AppleScript or JavaScript, but as you can see below, that area is blank and offers neither option. So far I've come up blank on a workaround. Maybe there's a third-party app I can use to circumvent Script Editor? (As noted in my initial post, I have already tried Safe Boot with no effect.)


Sep 7, 2024 2:25 PM in response to Cary Wolfson

Have you ever or continue to use any anti-virus tool, or so-called application cleaning applications that may have damaged the Script Editor application bundle? Have you attempted to change anything within that application bundle? Is this an iMac 5K earlier than a 2017 model that you used hackware to install Ventura?


What is your Region and Preferred language order in System Settings > General > Language & Region?


I do not mess with the AppleScript Settings, and here is mine from Sonoma 14.6.1 and looks the same on Ventura 13.6.9. I have no issues with the Script Editor on either platform.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Script Editor unable to open scripts

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