From ThoughtBridges
Jump to: navigation, search

Text editors

ExtendScript files are text files, and you can (and should) open them with a text editor.

To make efficient use of this wiki, you need a good text editor.

Because there are so many, I decided to select just two free text editors, and I’ll use these throughout the wiki.

On Mac, I’ll use TextWrangler (http://www.barebones.com). It is very powerful in its own right. Personally I don’t normally use TextWrangler; instead I use its big brother, BBEdit, also from Bare Bones. BBEdit is not free; it is a much enhanced version of TextWrangler. I highly recommend BBEdit, but for working through this book, TextWrangler will be just fine.

On Windows, I’ll use the free Notepad++ (http://notepad-plus-plus.org). You can also use the basic Notepad editor that comes with Windows, but using NotePad is not too much fun. Notepad++ has a lot of ‘script-friendly’ features that NotePad lacks.

I don’t recommend using Microsoft Word or TextEdit (which comes with the Mac OS). It is all too easy to accidentally re-save a pure text file in some non-text format (for example, RTF). This makes the script unusable.

As a general rule: when re-saving a script after modifying it with a text editor, make sure you did not accidentally save into a different file format.

A second ‘gotcha’ is that sometimes people accidentally re-save a script with a .txt extension.

For example, the original file might be myscript.jsx, but after opening, it’s accidentally re-saved as myscript.jsx.txt.

Computers are often configured not to show file name extensions - so the file seems to be called myscript.jsx because the trailing .txt is not shown. End result: the script will look OK, yet refuse to run.