Edit scripts with Script Editor on Mac
You can use Script Editor to edit scripts in much the same way you use text editors to edit text documents.
If a script was saved as a compiled script, you can open and then edit it by double-clicking its icon (it opens in Script Editor).
Note: If a script was saved as an app, double-clicking it runs the script.
In the Finder on your Mac, drag the script’s icon onto the Script Editor icon or window.
Or, in Script Editor, choose File > Open, then select your script.
Edit the script.
You can copy text from another document or webpage and paste it into Script Editor. You can also drag selected text from other apps or text clippings from the Finder into an open window in Script Editor.
Click the Compile button to compile the script.
When you compile a script, Script Editor adds indents to help you see the organised structure. Script Editor also applies different styles to different elements in your script.
If there are any errors, the compilation stops, the cursor remains on the line where the error is located, and a dialogue gives you information about the error.
Save the script.