2.3. Setting Script Editor's PreferencesNow that you've been using Script Editor for a little while, the boring text coloring is probably starting to get to you. Or maybe you're just sick of reading your scripts in a 12-point font. No matter what your complaint, chances are Script Editor can make things better for you. Start out by opening Script Editor Preferences (-,). You'll see five buttons in the toolbar, each for a different aspect of Script Editor's behavior. Click the category you want to customize (Figure 2-8), and continue reading.
2.3.1. GeneralFresh out of the box, your Mac comes with only one language you can use in Script Editor: AppleScript. That's why Script Editor automatically understands your AppleScript commands when you create a new script and click Run. However, some people install other programming languageslike JavaScriptfor use in Script Editor (Sidebar 3.2), and that's where the Default Language pop-up menu comes in. With this menu, you can select what language you want to use for all new scripts. (If you ever want to override this setting for a single script, just use the Navigation Bar [Sidebar 2.4].) 2.3.2. EditingThe three sections of the Editing pane allow you to customize how text appears in Script Editor's windows. The Line Wrap preferences, for example, let you set whether text that's too long for one line continues onto the next one (Wrap Lines on) or scrolls off the side of the window (Wrap Lines off). If you've turned Wrap Lines on, you can even set how many space-widths the overflowing lines are indented. The Tabs section, on the other hand, let you choose whether your script should be indented at all. If you turn off "Editor uses tabs," all your commands will end up flush against the left side of the Script Field. (Or, at least that's the idea; as of Mac OS X v10.3, this setting worked so inconsistently that it was pretty much useless.) Finally, turning on the Script Assistant enables Script Editor's secret autocomplete feature. With the Script Assistant, you don't have to remember the full names for AppleScript commands; you just type the first few letters, and the Assistant does the rest (Figure 2-9). 2.3.3. FormattingIf you're bored with Script Editor's coloring scheme, this is the preference pane for you. Simply select the kind of text you want to customizeLanguage keywords, for exampleand then double-click the little color swatch to open the Color palette and change its color. (If you'd like, you can also double-click an item's Font entry to change its font.) Figure 2-10 shows one possibility. As you go through the types of text, modifying them to your liking, the Category column updates itself with the fonts' new look. Click Apply to make your changes take effect, or click Revert to go back to the previous settings.
2.3.4. HistoryWhen you choose Window Result History (Option--R), you see a list of the results from the past few scripts you've run. You can set how many results are listed there by changing the "Maximum entries" setting in the History pane of Script Editor's preferences.
You can set the same preferences for the Event Log History, too (Section 14.2.2). 2.3.5. Plug-insScript Editor is useful on its own, but there are plug-ins to add even more features (such as those available from the Web sites listed on Section C.1). For example, the HetimaOsaxOpener plug-in adds a new item to the File menu for opening any scripting additions you have installed on your Mac (Sidebar 3.5). Here's how you'd install this plug-in:
If you ever want to disable a plug-in, just turn off its checkbox in the Plug-in preferences, and relaunch Script Editor.
|