director save scripts xtra

Das SaveScriptsXtra für Macromedia Director hilft beim Aktualisieren von Scripten, die in mehreren Projekten genutzt werden - oder bei mehreren PCs. Die Möglichkeit in Direktor die Scripte extern zu speichern hat leider ihre Nachteile - mit diesem kleinen Xtra ist man auf der sicheren Seite.
Eine genaue Beschreibung gibts unten.

Download (20kb)
Anforderungen: Das Xtra funktioniert nur auf PCs und der Version Dir 8.5 und darüber.
Installation: Der Inhalt muss einfach in den Director Xtras-Ordner kopiert werden. Normalerweise ist das:
C:\Programme\Macromedia\Director MX 2004\Configuration\Xtras

Ausserdem ist das (freeware) Xtra File4Xtra nötig:
einfach in den Xtra-Ordner kopieren.

Danach taucht das Xtra (nach Restart von Director) im Menü auf - dann einfach auswählen.

Es folgt eine ausführliche Funktionsbeschreibung des Xtras (nur in Englisch):

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.