director save scripts xtra

The SaveScriptsXtra for Macromedia Director helps you to update your scripts, that you use on multiple projects, or on different PCs. The built in Director feature to save external scripts has its drawbacks and bugs - so with this Xtra you are on the save side.
Detailed description is below

Download (20kb)
Requirements: will only work on PC and with Dir8.5 and up
Installation: Just copy the file, along with the *.ini to your Director-Xtras folder. Normally this will be:
C:\Program Files\Macromedia\Director MX 2004\Configuration\Xtras

You also need the (freeware) Xtra File4Xtra:
also copy this file to the Xtras-folder

Then after a restart of Director (will only work with Dir8.5 and up) the Xtra will appear in the menu. Start it (No harm can be done by just starting the Xtra).

Details about the usage of the Xtra:

This Xtra helps to use scripts in various director projects and/or to use a source-save system for your scripts. This works better than the linked-scripts feature of Director.

What it does

You can define a folder, where you want to save your scripts. The Xtra then compares the date of your script-members to the date of the files.
*If there is no file, it creates one with the membername.
*If the content of file an member is the same, nothing happens
*If ther member is newer, it gets exported
*If the file is newer, it gets imported
*On import or export the script can save a backup of the overwritten script/member.

When you hit the "put-mode" button, you can change to wich degree the results will be put to the message window.

When you hit the "sync-mode" button, you can change how the scripts will be selected

How to use

Define the options in the *.ini file, that should be located in the same folder as the Xtra.

The filename of the *.ini (before the extension) is the same as the name of the script. This way you can create multiple xtras with different options. Just create a copy of the xtra and *.ini - and give them a fitting name.

In the *.ini you can change the folder where the files are stored (destination), and where the backup is stored.

Set "Do Backup" to 1 if you want backups, and to 0 if you dont.

The putMode can be:
*all -> then every script comparision will be put()
*changes -> then only changes to files or member will be shown
*none -> only a "done"-message will appear

The syncMode can be:
*definedScripts -> then the xtra will search for the scriptnames you defined in the scriptlist.
*definedCasts -> then the xtra will synchronize every script in the casts that you defined in the castlist.
*currend Cast -> the xtra will synchronize every script in the currently selected cast

Depending on the setting in syncMode, list all the scripts you want to synchronize after "scriptList" or the casts after "castList". Use one line for every item.

If you have giant amounts (over 300) of members per Cast then set "maxMember" accordingly if you use the "definedCast" or "currentCast" mode (up to 2000).

You can write comments in the ini file (starting with a semicolon)

Possible problems

*Note that when you move a member, the modified-date of the member changes. If the contend is different from the file, it will overwrite it.
*If you use the "castList" then make sure the casts you defined do really exist. If they dont, then there will be a script error. This is a Director-bug - go blame MM ;-).
*When you use the mode-buttons in the xtra, this program saves the change to the ini. So any changes you did to the file while the Xtra was open, will be overwritten.
*Don't use this on Mac, it's only tested on Win

I use this Xtra a lot, so there are no bugs that I know of. But of course I won't give any guarantee or warranty. Try to use a source-save system like CVS or Subversion. This will protect you from any user or program error.

Version history

*Oct-21-2004 v03 added syncModes, backup now optional
*Sep-01-2004 v02 name of ini and xtra can change now
*May-05-2004 v01 created


*more iterations of the backup (01, 02...)


Any bugs found? Do you have comments, or feature wishes, then feel free to mail me.