Quantumwave Interactive Inc.
  Interactive media development . Programming . Design . Consulting

qwiScriptStyler Xtra

 

What it is?

qwiScriptStyler is a Director 6 and 7 Xtra for formatting Lingo code. It also functions as a Movie-In-A-Window windowType displayer.

This Xtra was originally written for our own use at Quantumwave Interactive because we wanted a small, simple and customized code formatting engine, and to have a program always available for choosing MIAW window types.
 

What's new in version 2.00 (beta 1)?

New interface design, new Preferences option (disabled in this beta version by default, Ctrl-Shift-Click to activate preview).
 

Installation

Drop the Xtra (qwiScriptStyler.dxr) into the Director Xtras folder.
 

Usage

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.
 

Known issues

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.

Licensing

This program is copyrighted by Quantumwave Interactive Inc. and is distributed as freeware.
 

Distribution

You may distribute this program only in the original archive (i.e. it must include this Readme document without modification). You may not make profit by selling this program. You may include this program in commercial distribution channels (including books, shareware discs etc.) only with our prior permission.
 

Version history

2.00b1 (June 16, 1999) - new interface public beta version

1.20 (Aug 11, 1998) - customizable version with interface improvements.
1.11 (Jan 25, 1998) - now display the word "Working..." during formatting.
1.10 (Jan 24, 1998) - improved color handling; new button to start.
1.00 (Jan 23, 1998) - first public release.

Download (use the latest Aladdin StuffIt Expander)

Version 2.00b1: Mac (.hqx 62K), Mac (.sit 46K), Windows (.zip 45K)

Version 1.20: Mac (.hqx 150K), Mac (.sea 109K) or Windows (.zip 13K) 


home | about | news | flash | director | shockwave | download | dave | résumé | contact

Copyright © 1995-2009 Quantumwave Interactive Inc.