Articles Archive
Articles Search
Director Wiki
 

Matt Cave's Director Development Tools

September 3, 1998
by Zac Belado

prettyScript version 2.0

Now you can call me anal retentive if you like but I always color code my Lingo scripts. Actually it has alot more to do with being dyslexic and not able to tell the difference between "spot" and "pots" on a bad day, but that's beside the point.

So prettyScript is something that I certainly looked forward to reviewing.

prettyScript's installation is simple. Just drag it into your Xtras folder (prettyScript also requires that you install the TextCruncher Xtra which is supplied with the package) and start Director. prettyScript will now be available under the Xtras Menu in Director.

Using it is even easier. It can colorise single cast members, multiple cast members or all the scripts in a castLib. If you only want to colorise one script then simply open that script in the Script window or select it by itself. Selecting just a few, or all the members of a castlib in the Cast will "prettify" multiple scripts at once.

In its "basic" mode, prettyScript will allow you to colorise globals (including object properties which I find a tad annoying), comments and structural keywords; structural meaning Lingo keywords such as end and repeat.

By selecting the "Complex Formatting" option prettyScript will also allow you to colorise parameters (me,x,y in the on new method below) and custom handlers names. Matt mentions in the prettyScript readme that the complex formatting option adds about 33% to the time taken to format the text. Which certainly makes sense as prettyScript will format all the instances of your properties, globals and handler names even if they are in comments or inside other lines in a script (see the example below). This makes finding important pieces of code extremely easy.

 

Before

After



Its rather easy to see that the "after" example is much easier to read.

Tests with some of my own code (765 lines of utility objects that I keep in a castLib called Toolkit) resulted in 28 seconds elapsed time with Complex Formatting enabled and 14 seconds with it turned off. These times are highly unscientific though.

I only have two minor problems with prettyScript. One, the aforementioned problem with properties being colored the same as globals. Secondly, prettyScript doesn't seem to remember if you had the tooltips turned off or not. Neither are crutial problems and I think you'll find prettyScript well worth the $20 US price.

script Database version 1.5

Matt also proves the answer to the ever popular "where the heck is that array object" question that we all frequently ask ourselves.

script Database is, as the name subtly implies, a database for all your Lingo scripts. script Database allows you to divide your stored scripts into several categories, such as Button Handlers, each of which can have numerous scripts stored inside them. Each script also can have a description attached to it so you can store general info and even parameter descriptions for the code. And as an added bonus all the scripts have their size, in bytes, displayed for you size conscious Shockwave developers.

 

Installation is just as easy as prettyScript. Drag it into the Xtras folder and start (or restart) Director.

To add a script to your movie simply select the script and click on the Import button. The script will be added to the currently selected cast member, or the first free cast member if the selected member already has a script in it.

Adding a script to the database is just as easy. Select a script, click the import button and script Database will guide you through the two steps needed to import the script data. If the script cast member has a name, that name will be automatically incorporated into your new entry.

Once you have entered a name, decription and selected a category (a name for the script is mandatory) you are given a view of the script (for a final check to ensure that you are adding the right script) and can then finish adding the script to your database. At each stage you can cancel out of the process.

All very straight forward with the small exception that script Database will not try to add the new script to the currently selected category. So if you have Interface Widgets selected the movie will still try to add the new script to the last category you imported a script into. Useful if you want to add multiple scripts to the same category but a bit annoying otherwise.

Scripts, objects and behaviors are all indicated by an icon in the bottom right corner of the display giving you an immediate visual clue as to the nature of the beast you are viewing.

As well, you can delete individual scripts from the database and save the database if you are so inclined. Deleting scripts is a bit problematic as sometimes the formatting dialog box eliminates the selection in the scripts listBox. Meaning that even though you have a certain script selected (and will be the one deleted if you click on the delete button) you really have none of the visual feedback that you are used to. To my mind though this is more a problem with Director and its lack of proper dialog boxes and less a problem with Matt's database.

script Database is the less "polished" of the two tools. While it is certainly useful (and some of the scripts, by such luminaries as Mark Hagers and Darrel Plant, are an added bonus especially if you are new to Director) it does have its flaws.

Aside from the above mentioned interface glitches there is no ability to modify the entries once you have imported them. The formatting of the scripts is rather slow, especially considering the size of the scripts involved. Selections sometimes get lost or confused resulting in the tool selecting multiple scripts when you only clicked on a single one (again this is really more Director's fault).

But then its also $10 US. Thats right. Less than you'll spend on movie and popcorn.

So, to sum it all up. A definite "Must Have!" for prettyScript and an enthusiastic "Good Job" on script Database. Although, I've spent more money playing Soul Edge in the arcade so if you are looking for a solution that will organize your scripts in Director then this is really the best way to do it.

scriptDataBase: $10 US
prettyScript $20 US

Both are available from Matt's web page (URL below). prettyScript is available as a demo version that does not allow the Complex Formatting option to be enabled. script Database is available in a fully functioning form. Both tools are for Director 6 only.

Matthew Cave
280 W. Renner #1113
Richardson, TX 75080
http://rampages.onramp.net/~joker/tools/

Zac Belado is a programmer, web developer and rehabilitated ex-designer based in Vancouver, British Columbia. He currently works as an Application Developer for a Vancouver software company. His primary focus is web applications built using ColdFusion. He has been involved in multimedia and web-based development, producing work for clients such as Levi Straus, Motorola and Adobe Systems. As well, he has written for the Macromedia Users Journal and been a featured speaker at the Macromedia Users Convention.

Copyright 1997-2024, Director Online. Article content copyright by respective authors.