Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

'Script Editor' Concerns: Redirects to 'Utilities' Folder & Opens in Illegible Code

Major Script Editor Concerns:

How I Get this Error:

  1. I Open Applications folder
  2. I Open Utilities folder
  3. I Open Script Editor
  4. I am Redirected to the Utilities folder
  5. I Open Script Editor
  6. I Get Illegible Code that is Locked


When I double-click on Script Editor, I am redirected to the Utilities folder. And, when I open Script Editor, I get Illegible code, that is locked. I cannot unlock nor delete it. I am prompted that I can duplicate it. Will duplicating it fix all of this?


Click the images to view in full-size:


  • What is this Illegible Code?


  • I Cannot Delete it. What if I duplicate it?

MacBook Pro 15”, macOS 10.15

Posted on Jun 27, 2020 2:35 AM

Reply
Question marked as Best reply

Posted on Jun 27, 2020 11:13 AM

Drag and drop the Scrpt Editor from the Applications/Utilities folder to your Dock, and lock it there. When you single-click the Script editor, it will open a file chooser, and I typically click Desktop and New Document to have it open with a blank document. Why you thought you should open the script editor application with itself remains a mystery…


Script Editor is dependent on the Scripting Dictionary support for individual applications (including the Finder) that can be found in File menu : Open Dictionary… . Once you select a dictionary (e.g. Finder) then you need to know enough AppleScript to wrap those reserved words with AppleScript, which is described in more detail here. More hand-holding is found here.


Typically you enter your AppleScript syntax and it will be in purple text until you click the hammer (compile) button which will transform your code into multi-color text — unless it finds syntax errors, which are usually codes with cryptic descriptions. When you want to save your script, you have a choice on the Save panel of how you want to save the code:

  • text: .applescript extension, source
  • script or script bundle: .scpt, .scptd compiled and double-click to run
  • app: .app, compiled and runnable via double-click.


The very first line of code in any new script should be: use scripting additions.

If you want more information on writing a script to do something, please advise.

9 replies
Question marked as Best reply

Jun 27, 2020 11:13 AM in response to TheLittles

Drag and drop the Scrpt Editor from the Applications/Utilities folder to your Dock, and lock it there. When you single-click the Script editor, it will open a file chooser, and I typically click Desktop and New Document to have it open with a blank document. Why you thought you should open the script editor application with itself remains a mystery…


Script Editor is dependent on the Scripting Dictionary support for individual applications (including the Finder) that can be found in File menu : Open Dictionary… . Once you select a dictionary (e.g. Finder) then you need to know enough AppleScript to wrap those reserved words with AppleScript, which is described in more detail here. More hand-holding is found here.


Typically you enter your AppleScript syntax and it will be in purple text until you click the hammer (compile) button which will transform your code into multi-color text — unless it finds syntax errors, which are usually codes with cryptic descriptions. When you want to save your script, you have a choice on the Save panel of how you want to save the code:

  • text: .applescript extension, source
  • script or script bundle: .scpt, .scptd compiled and double-click to run
  • app: .app, compiled and runnable via double-click.


The very first line of code in any new script should be: use scripting additions.

If you want more information on writing a script to do something, please advise.

Jun 27, 2020 9:40 AM in response to TheLittles

Points 1, 2, 3, 4 are OK: you follow the path of the Script Editor app and you launch it. Nothing wrong or unusual.


Point 5 makes no sense: there's no reason to open the app you have just launched with the app itself. The result, in fact, is point 6 which of course is useless.


Just open a real script on point 5 (for example, one that you find in /Library/Scripts/ or dowloaded elsewhere on internet or simply choose New Document to make a blank script).

Jun 27, 2020 10:46 AM in response to Marco Klobas

Marco Klobas Said:

[...]The result, in fact, is point 6 which of course is useless. Just open a real script on point 5[...]

———-


You are correct.


But, I need to get Script Editor to open as the application itself — not in Utilities. And I need it to open with a blank document — not its own script.


Open a script document itself, and all is fine. So, no worries there.


Why it opens with it, I do not know. Though, I think it may be a broken link.



Malwarebytes finds nothing.



What’s next? I plan to:

Open a Virtual Machine(VM) with FTP and DHCP enabled. From there, scan the macOS with an AV program. It’s worked in the past in finding items (not deleting them from the VM). Once found, I can proceed from there, with the removal. Expect an update later on.

Jun 27, 2020 10:58 AM in response to TheLittles

You are attempting to open Script Editor with itself. That is the binary context of the Script Editor app.


Can you explain what you mean by "I am Redirected to the Utilities folder"?


It sounds like you open Script Editor and Script Editor launches with a file open dialog. I think this is a change in behaviour when you turn on iCloud Drive and/or Desktop and Documents. Instead of getting an untitled window by default, you get an open panel. You can click on the "New Document" button at the bottom of the open dialog to get a new document.

Jun 27, 2020 12:22 PM in response to VikingOSX

VikingOSX Said:

"[...]When you single-click the Script editor, it will open a file chooser[...] Why you thought you should open the script editor application with itself remains a mystery…[...]"

-------


It is a Mystery, on my Part:

That's what got me - I must have been in the Utilities folder the last time opened Script Editor - had it have opened elsewhere, I would not have questioned myself right-off-the-bat. Script Editor is in the Utilities Folder


Thank you.

'Script Editor' Concerns: Redirects to 'Utilities' Folder & Opens in Illegible Code

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