Script Editor Icon

Editing a script

You can use Script Editor to edit scripts in much the same way you use text editors to edit text documents.

To edit a script in Script Editor:

Step 1

Drag the script’s icon to the Script Editor icon, or open the script from within Script Editor.

Step 2

Edit the script.

You can copy text from another application and paste it into Script Editor. You can drag text from other applications. You can also drag text clippings from the Finder.

Each command must be on a single line. In a complex command, this can result in a long line. You can break the line so it’s treated as a single line by holding down the Option key and pressing Return. A special character ( ¬ ) appears at the break.

Step 3

Click Compile to compile the script.

If there are any errors, the compile will stop, the cursor will remain on the line where the error is located, and a dialog will give information about the error.

When you compile a script, Script Editor adds indents to your script to help you see the organized structure. Script Editor also applies different styles to different elements in your script.

Step 4

Save the edited script.

Related Topics

editing scripts

Open

Open Script Editor