Start
Director, and choose the Xtra from the Xtras menu.
The
cursor changes to a pointing finger over three clickable areas:
-
WindowType
-
URL
-
message box and start button
Note
that the first time the Xtra is used, formatting will use the default
settings if no preference file is available. The
default setting is: "Monaco" at 9 points on the Mac, and
"ASI_Mono" at 9 points for Windows. Both uses "plain"
as the style, and script colors are retained (-1). See below for
information on changing the default settings.
After
formatting, all handler names, the words "global" and
"property" are set in bold regardless of font styles.
Formatting
Click
the button "Press here to start" to begin formatting.
The message box displays "Done!" when the Xtra has finished
formatting all the scripts.
Tip:
When editing a script, Select All and press Tab to place the cursor
at the beginning of the script. The next time the window is opened,
the cursor will be at the top of the script window.
Preference
file
Starting
from version 1.20, a preference file is used to store the user settings.
It is located in the Director - Prefs directory. The easiest way
to locate this file is to do a search of the filename (qwiScriptStylerPref.txt).
The
default preference file looks like this:
Monaco:9:plain:-1
(Mac)
ASI_Mono:9:plain:-1
(Windows)
The
format is <font name>:<point size>:<style>:<color>
with attributes separated by colons (no space in between; font name
can include spaces if the actual font name include spaces).
The
<style> attribute can be a combination of the standard Director
fontStyles including:
plain,bold,italic,underline,shadow,outline,extend,{Mac}condense
or none
Note
that "condense" is only available on the Mac. Use "none"
to specify no change to font styles.
The
<color> attribute specifies the font color which affects all
scripts. The default is black. Use an integer from 0 to 255 to specify
an indexed color in the current movie palette. Use -1 to specify
no change to the font color(s) if you have color-coded scripts.
Example
preference files:
a)
Courier:12:none:255
All
scripts will be formatted with the Courier font at 12 points,
script font styles will be retained, and script font colors will
use color #255 in the current movie palette.
b) Lucida Sans Regular:10:underline,italic:-1
All
scripts will be formatted with Lucida Sans Regular at 10 points,
styles will be set in underline italic, and font color(s) will
not be changed. Notice the spaces in the font name, and the combination
of styles by separating style attributes with commas.
Tip:
This Xtra reads from the preference file everytime it is started.
To change the setting, edit the preference file with a text editor,
save, and reopen the Xtra without quitting Director.
Displaying
windowTypes
The
second purpose of this Xtra is to display the different window types
for authoring Movie-In-A-Window.
To
scroll through the different window types, click on the "WindowType"
button. The current windowType ID appears in the message box. To
reset to the default window type, hold down Control while clicking "WindowType".
Warning:
some window types are not supported and could cause problems as
documented in the Director manual. Stay with the supported window
types just to be safe.
If
a script has been changed and not recompiled and/or saved, running
this Xtra may bring up a dialog box saying the cast member or script
cannot be found. Solution: make sure all scripts are compiled and
saved before formatting.
Resetting
the windowType repeatedly moves the Xtra window up by a few pixels
(this seems like a system behavior which needs further investigations).
If
the font in the preference file is not found (either because of
typing error or system error), the default system font is used instead.
If all else fail, delete the preference file and restart the Xtra;
it'll generate the default preference file again.
Because
of the new codebase in Director 7.0, script font properties were
not accessible (prior to 7.02). This was a bug which prevented this
Xtra (and other similar utilities) from formatting scripts in Director
7.0. Solution: Download the updater
for 7.02 (or newer) and disable Auto Coloring under Script Preferences.