Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window
wiki:utilityHandlers
Last modified 3 years ago Last modified on 03/31/09 09:22:30

Table of Contents

  1. NOTE
  2. Glossary
    1. Insert current date
    2. Insert divider
    3. Insert lingodoc script abstract
    4. Insert lingodoc handler description
  3. BBEdit Handlers
    1. Edit in BBEdit
    2. Open in BBEdit
    3. Refresh members edited in BBEdit
    4. Open linked script
    5. Diff selected script
    6. Batch compare selected scripts
  4. FileIO
    1. Choose file…
    2. Choose folder…
    3. Read text from file…
    4. Get file list from folder…
    5. Get folder list from folder…
  5. XML
    1. Read XML file…
    2. Export list to XML file…
  6. Convert Text into Image with Mask
    1. Convert to bitmap
  7. Find all Instances in Score
    1. Find in GPDL…
    2. Select member in score…
  8. Linked Members
    1. Unlink bitmap members
    2. Link selected text…
    3. Update all linked texts
  9. Export Members
    1. Export selcetd text as…
    2. Export selected bitmaps…
    3. Export to bitmap…
  10. Process Castmembers by Name
    1. Delete Members By Name…
    2. Name Members…
    3. Prefix/Suffix Names…
    4. Make numbered names…
    5. Replace in name…
    6. Fill empty castslots with dummy members
    7. Erase dummy members
  11. Script Statistics
    1. Put script stats
    2. Find all Puts
  12. Alex Help Miaw Handlers
    1. Lingo help…
    2. Create help files from selected members
    3. Create members for help files from selected script
  13. Alex Linked Scripts System
    1. Link selected alex-linked-library-scripts
    2. UnLink selected alex-linked-library-scripts
    3. UnLink all alex-linked-library-scripts
    4. Open original of selected alex-linked-library-script in BBEdit
    5. Check changes in selected alex-linked-library-scripts
    6. Refresh selected alex-linked-library-scripts
    7. Export a list of used alex-linked-library-scripts
  14. SUBVERSION
    1. Compare to SVN
      1. Compare selected scripts with Working Copy…
      2. Export selected script to Working Copy and Open…
    2. Subversion SVN
      1. SVN Quicklinks
        1. SVN Update all castlibs
        2. SVN Update selected castlib(s)
        3. SVN Commit selected castlib(s) and scripttext
      2. Scripttext ex/import for SVN
        1. Export scripts to SVN working copy…
        2. Import script from file…
        3. SVN Update ScriptText in Working Copy…
        4. SVN Import Scripts, Text and Fields from working copy…
        5. SVN Commit ScriptText only…
        6. SVN Delete Selected Scripts…
      3. Fields and text ex/import for SVN
        1. Export text members to SVN working copy…
        2. Import text from SVN working copy…
        3. SVN Import Scripts, Text and Fields from working copy…
      4. SVN -- binary director files
        1. SVN Update selected castlib…
        2. SVN Update Current Movie…
        3. SVN Commit selected castlib…
        4. SVN Commit current Movie…
      5. SVN -- binary AND text
        1. SVN Commit selected Castlib AND Scripttext…
        2. SVN Commit current Movie AND Scripttext…
  15. Misc.
    1. Convert textmember to HTML + copy to clipboard
    2. Fix colors in scriptlists (SES 10 -> SES 9)
  16. Unix path
    1. Convert path from HFS to UNIX
    2. Convert path from UNIX to HFS
  17. Castmember Thumbnails
    1. Make castlib label…
  18. Open containing folder in Finder

Error: Macro AutoNav() failed
'Formatter' object has no attribute 'db'

Utility handlers

Command list as of 12/11/2007

Here is a rough description of the long pile of utility commands, which can be found in the permanent command section of the HandlerMenu tool.


NOTE

Some functions take parameters wich are provided via MUI dialogs. As the dialogs only can take string arguments, but I still want to pass variables, I do a value() on each string. If the value() functions return void, then the parameter is treated as string, otherwise the value is taken.

So global variables (every variable, which was defined in the message window for example) can be used as parameters, as well as reserved keywords and expressions.

Unfortunately this has some implications and restrictions. If the words and, or or + and - appear in the string, the parameter is not treated as string. In most cases, I haven't had any problems with that, but mostly the commit messages in the SVN functions sometimes refuse to work, esp. because svn commits always require commit messages. I may have put a hack into the scripts in order to handle svn commit messages always as string. As soon as any string in a MUI text entry field starts with the exact string "@@" it is ALWAYS treated as string. The only thing left to avoid now is the double quote! Please use a single quote instead of a double quote in that case.


Glossary

Insert current date

Paste a string with the current date into the currently open and frontmost script.

Insert divider

Insert a divider line, like I like to have between my handlers.

Insert lingodoc script abstract

Insert a standartized comment at the top of the script in order to be of a format which my trac plugin (lingodoc) can parse and the script can be used directly from the repository in trac.

Example for a lingodoc?

Insert lingodoc handler description

Insert a standartized comment at the top of the handler in order to be of a format which my trac plugin (lingodoc) can parse and the script can be used directly from the repository in trac.

Example for a lingodoc?

IMPORTANT NOTE FOR THOSE PASTE HANDLERS: Getting the correct scriptmember is sometimes difficult as there is no direct method to tell which script is frontmost as I can only query te selection of every castlib and check if that is a.) a script and b.) it is the activecastlib. However, the castlib may not be the activecastlib anymore, when you select another castlib and still have the script from the previous castlib open. So handle with care... Also just adjust the string, which gets pasted to your own liking. We all like different styles of dividers for example.


BBEdit Handlers

These handlers only show up if the platform contains "mac", as BBEdit is a mac application.  BBEdit is a professional code editor for mac. It's price tag is high for a code editor, but I think it is worth any single cent, as it can be a huge time saver and is the swiss army knife for code on the mac. Make sure, that you instal the bbedit command line tool, so these functions can use the shell xtra to invoke bbedit and bbdiff.

Sure enough it ought to be easy to adjust these handlers to work with other apps like for example the also very great open source app  Smultron

I am also sure, that there are windows apps, which may offer the same functionality like BBEdit does on the mac, but bear with me, I am not the person to ask, when it comes to windows solutions. I would be glad though, if someone told me which app could be addressed on windows in lieu of BBEdit.


Edit in BBEdit

This command writes the scripttext of the currently selected script to a temporary file and opens the file in bbedit in a way, that the process waits until the user closes the file in bbedit and then automatically returns to the caller. In the next line of lingo code the temp file is read back into the script. This the changes made in bbedit will be incorporated in the lingo script castmember. So to speak it is a synchronous call. You can open your script in bbedit, save and close and you will automatically be back in director with the modified script. It is basically the same functionality as Directors built-in Launch external editor


Open in BBEdit

Since the command Edit in BBEdit (or: Directors Launch external editor for that matter) will only be able to handle one single script at a time, this is another method to achieve a similar functionality with more than only one script. This call exports the scripttext of every selected script member to tempfiles and opens them in BBEdit. Now after completing editing and saving the changes in bbedit, choose the below Refresh members edited in BBEdit command to read the modified tempfiles for the selected scriptmembers(!) back in. Please be aware of the fact, that this call uses the castmember name as filename to write AND read back in the temporary file. So duplicate names and the like may lead to unwanted results. So using this call you can switch back and forth director and the external editor as often as you like and have more than one scripts at a time open in the external editor (e.g. to compare) and only have the changes read back in on demand for only the members you select.


Refresh members edited in BBEdit

This command reads the file with the castmember name from /tmp. So if your castmember's name is myScript the call attempts to read /tmp/myScript.ls. This command is meant as counterpart to Open in BBEdit in order to work with more than one script at a time in BBEdit.


Open linked script

Open the linked script with BBEdit for all selected members of type script, which are linked scripts (=> filename.length > 0)


Diff selected script

This command compares two selected scriptmebers using the commandline utility bbdiff, which displays the differences in BBEdit. First it exports the scripttext to temporary files and calls BBEdit in an synchronous way, so that director "waits" until the Diffs window in BBedit was closed. As soon as that happens the focus returns to Director and the temp files are read back in. So you can make changes to the files in BBEdit, save the changes and close the diffs window in order to return to Director and have the changes incorporated into the selected scripts.


Batch compare selected scripts

This command compares two or more selected scriptmebers using the commandline utility bbdiff, which displays the differences in BBEdit. Note that the total number of selected script castmembers is divided by 2 and the first of the "first half" is compared to the first of the "second half", the second of the "first half" is compared to the second of the "second half" and so on. So if you select 10 members member 1 is compared to member 6, member 2 is compared to member 7, member 3 is compared to member 8, member 4 is compared to member 9 and member 5 is compared to member 10. So you can compare one block of members against another block of members. Usually I simply copy a block of scriptmembers in the old version and paste it temporarely into the castlib of the new version of a movie, then I select both blocks and compare. This will open the BBEdit results window and I can see the changes from one version to the other. Be aware of the fact, that this works with text and field members also.


FileIO

These are some handlers which use the fileio xtra, which is one of directors standard xtras, or if available the  BuddyApi xtra, for simple file system calls.


Choose file…

Show a file selection dialog and return the path to the selected file as result in the global variable gRetVal.


Choose folder…

Show a folder selection dialog and return the path to the selected folder as result in the global variable gRetVal.


Read text from file…

Read the contents of a selected file and store the result in the global variable gRetVal. If no path to a file is provided a file selection dialog is displayed.


Get file list from folder…

Get all files from selected folder as a list and store the result in the global variable gRetVal. If no path to a folder is provided a file selection dialog is displayed.


Get folder list from folder…

Get all folders from selected folder as a list and store the result in the global variable gRetVal. If no path to a folder is provided a file selection dialog is displayed.


XML

Convert lingo lists from and to xml format. It is a very simple xml format, without attributes. A property will be used as tag name. Therefore properties must be of a format, that can be made into a symbol. (no spaces and other fancy chars). Not that my lingo based xml parser would mind, but the output wouldn't be valid xml.

Linear lists use "item" as tagname. Everything which starts with "item" will be regarded as linear list item, when read back in.

When converting from xml to list values are tried to be casted to the correct lingo types.


Read XML file…

Select path to xml file and receive a lingo list as result stored in the global variable gRetval.


Export list to XML file…

Provide a lingo list (must be a global variable, just assign it once in the message window to make it global), and then select path to store the resulting xml file.


Convert Text into Image with Mask

Convert to bitmap

For each text or field member in the current castlib selection create two new bitmap members, which represent the rendered text. Not only does it make your movie independant from installed fonts, but also it is much faster to display a bitmap, than to render the text. Since it is only a 1-bit image for the foreground and a 8-bit grayscale image for the alphachannel, the filesize doesn't go up too dramatically, but the performance will increase. So for static text, which doesn't change the content at runtime, I tend to use these prerendered text images. The fontcolor can be adjusted using the sprites forecolor. Drag the foreground image to the stage, set its sprite ink to #mask and adjust the color via the sprite color chooser. Make sure to not move the alphamask member, it needs to follow the foreground member directly in the castlib in order for ink #mask to work.

Note that this command also works with field members, which have no image property


Find all Instances in Score

Find in GPDL…

search in all behavior initializers (GPDL) of the current movie for <str> if <str> is "" or void, then default to the current selected script member name as parameter. This is useful to check, whether a member is referenced in the the GPDL.

Select member in score…

Unlike Diirectors own select in score command, this one selects ALL occurrences of the selected member in the score. So you can change all instances at once using "Exchange members" or change the properties of the GPDL for all sprites usingthe same behavior. Parameters can be:

  • put mSelectInScore() -- current frame
  • put mSelectInScore(1, 0) -- all frames
  • put mSelectInScore(20, 30) -- frames 20 to 30

Linked Members

Unlink bitmap members

Unlink all selected bitmap mmbers

Link selected text…

Export the contents of the selected text member and store the path to the external file in the member comments. So the contents can be refreshed with the below Update all linked texts command after it has been edited externally.

Update all linked texts

Refresh the contents of the linked text members, which were created using the above Link selected text command.


Export Members

Export selcetd text as…

Export the selected #text- or #field-member to file in either txt, html or rtf format. Default format is txt. Specify the format using the parameter:

  • txt, text or plain for plain text format
  • rtf for rtf format
  • html or htm for html format.

If the type parameter is left empty, then the type is determined by the extension given to the file to save.

Note that members of type #field will always be exported as plain text


Export selected bitmaps…

Batch export all selected bitmaps using the below Export to bitmap command

Export to bitmap…

Export selected bitmap using Werner Sharps Image Export xtra, if present. (Otherwise fail silently) Get the xtra and infos about it at:  http://www.sharp-software.com

-- -- ARGUMENTS: -- thePath: #string -> filename; if not a string or "" then a file save dialog (fileio) is displayed

-- theType: #string or #symbol -> type of output file; possible values: jpg, png, bmp, pct

-- if voidP or not a symbol then defaults to pct on mac and bmp on windows

-- compr: #integer -> jpg quality


Process Castmembers by Name

In this section, you'll find handlers, which modify or process mmbers by their membername.

Delete Members By Name…

Delete all members, which have a name which matches the criteria defined in the parameter. There are the special characters ^ and $. ^ means "start" and $ mens "end".

So use ^praefix as parameter to process all members starting with praefix. This would find member("praefix") and member("praefix_and_suffix"), but NOT member("mypraefixMember")

Use suffix$ as parameter to process all members whose name ends with suffix. member("sufix"), member("praefix_and_suffix"), but NOT member("my_suffix_1")

Use ^exactMatch$ for to process all members whose name matches the string exactMatch exactly. Only member("exactMatch") will be processed, but NOT member("myExactMatch") and not member("exactMatch1")

Don't use any special chars to process any member, which CONTAINS the search string.


Name Members…

Just batch name the selected members using the string provided as parameter.

Prefix/Suffix Names…

Prepend or append the provided string to the name of every selected member.

Make numbered names…

Append a number to each selected member in order to make a numbered list of member names. The startnumber, the increment, the number of digits and a string used to seperate the number from the current name can be specified.

Replace in name…

Search and replace in member names of selected members.


Fill empty castslots with dummy members

In order to drag members from oe castlib to another, but still provide their castslot, even, if there are empty members in between the selection, this command can be used in conjunction with the below Erase dummy members command to temporary fill the empty castslots with dummy members.

Erase dummy members

Erase the dummy members, which were created using Fill empty castslots with dummy members. Read the above description of Fill empty castslots with dummy members for the reason to do so.


Script Statistics

Put script stats

Count all chars, words, lines of all scriptmembers and put the result into the message window.

Find all Puts

Removing all put statemets, which clutter the message window can be cumbersome, as you can't jsut search and replace, as put may appear in the string context of put..into, put..before or put..after. This handler takes a significant time to search all your scripts for lines, it considers message window puts and lists them in the message window, along with the syntax to open the corresponding script using the UIHelper xtra. So you can just execute the line in the message window to reach the specified put statement.


Alex Help Miaw Handlers

These are handlers which address a very old tool miaw, which provides a director help viewer. Directors help system in D8.5 was pretty slow on mac and thus I rote this tool, which uses the html help files from that release. But there are also help indexes for som xtras, which can be changed and corrected. New indices for your own projects can be also created. Later the tool can be used to output the entries in html format as single html pages. Read the project page for further description:  Custom help tool at Farbflash

I use it myself to gather bugs and quirks, which I can later submit to Adobe.

Lingo help…

Open help viewer Miaw tool and display the help page for the word specified as parameter.

Create help files from selected members

Create help index files in the currently selected help index in the help miaw tool, from selected TEXT members. Each text member yields one new help page in the current index. Create a new index first in the help miaw tool, in order to create help or documentation for your own project.

Create members for help files from selected script

Create text members for each handler of the currently selected scriptmember, which can then be used with the above Create help files from selected members command to create help files in the help viewer. Later you can use the help viewer tool to create a html version of the help files. The files will be created following a standard format and if there are comments above the handler, these will be put into the file as comments. So if you commented your handlers, this is the way to automatically create kind of a documentation of the script.


Alex Linked Scripts System

These handlers all treat my own library scripts, which are taken from a "centralized" library and which store the source file in their member comments. So I can constantly improved and work on them and simply get the bugfixes and improvements in all my movies, if I re-import them. I started with linked scripts, but this approach proved to be more immune against unwnated updates and changes. Linked scripts tend to update sometimes, what you did not want to update or overwrite themselves with older versions. All in all you must be very careful with linked scripts and this approach which is similar to using a code repository suited my needs better.

Link selected alex-linked-library-scripts

In order to update the scripttext I sometimes just link the scripts and after a save unlink them with the below command. But lastly I almost always used Check changes in selected alex-linked-library-scripts which works with bbedit and allows me to review the changes one by one, which is most of the times exactly what I want.

UnLink selected alex-linked-library-scripts

See above

UnLink all alex-linked-library-scripts

Batch unlink linked scripts


Open original of selected alex-linked-library-script in BBEdit

Find and open the counterpart of this selected script in BBEdit. The file, which is specified in the first line of the member comments is the counterpart in this case. Use ~ as placeholder for your homefolder. So you do not need to use absolute paths.

Check changes in selected alex-linked-library-scripts

Check the changes against the counterpart of this scriptmember in the library. If anything is different open both scripts in a 'live-edit session in BBEdit. See the above description of Open original of selected alex-linked-library-script in BBEdit for what is meant by counterpart and read the description of the Diff selected script command for what is meant by 'live-edit session in BBEdit.'


Refresh selected alex-linked-library-scripts

Instead of link and unlink, just import the corresponding scripttext of the counterpart.


Export a list of used alex-linked-library-scripts

Check which of my library scripts are used in the scripts and compute a list of them.


SUBVERSION

These SVN handlers follow my own approach of dealing with subversion in director (Subversion is a very good code versioning system; see  http://subversion.tigris.org). While we could work directly in our svn working copy folder, I chose to keep the working copy folder seperate to my Director project folder. This adds another layer of security "firewall" between my svn version control system and the files I work on. Note: I noticed, that on windows it won't even work as the files are protected if opened by another application and thus some svn version to commit the movie binaries, which are opened at the moment. You'll need to fix it, if necessary for you by temporarely switching to a new movie.

Additionally, the biggest problem, when working with Director and SVN is that directors lingo code is embedded in a castfile and will always be treated as binary file by SVN, which is a bad thing for source control as it doesn't treat binary files "line by line".

There are basically two solutions:

  • Working with Directors linked scripts or, my approach,
  • keep two copies of the scripts: binary in the castlib and text in seperate files.

While the last method looks more complicated it is indeed more secure and immune against unwanted changes and overwriting unsaved changed by accident. In a way Directors linked scripts are handled in much the same way. There are also 3 versions of the script: One compiled binary version in your castlib, one text version of your script in your castlib and one text version of your script in the linked script external file (Director keeps a copy of the scripttext in case the external .ls file is missing, in order to be still able to recompile all scripts).

I have it much the same way, except, that I handle the external files myself, and link them only by identifying them by their member name. This is the BIG CAVEAT, when using my system: ALWAYS make sure, that your scriptmembers are named and have unique names. If they have no names or the names are not unique my scripts will warn the user and rename the members in case of having no membername, but still they may fail.

Basically the text of scripts and text and fields will be exported to single files in a folder for each castlib. So at first export you choose your working copy folder where as many folders are created as you have castlibs. If you have not yet a working copy folder, you can just export to a new folder and later ad the folder to the subversion repository. Please refer to the SVN manual on how to handle Subversion source code control.

In each folder the scipts and text will be exported along with one index file in xml format, where for each file metadata is stored, like comments and scripttype for example.

This index file is later used to read the files back in.

This folder then is maintained by SVN.

convertLineBreaksToUnix is a boolean flag, whether linebreaks shall be converted to unix style linebreaks. Note that the default is TRUE, if no value is specified, as it turned out, that I always want to do that, as my trac repository viewer is much more happy with unix linebreaks, than with mac linebreaks. I guess it would also work without conversion with windows style linebreaks, but in order to be platform independant between windows version and mac version, I prefer having them all as UNIX style linebreaks on both platforms and just convert the linebreaks every time for the specific platform. This adds some overhead, but after all this is authoring only and waiting some 100 milliseconds longer when commiting isn't that bad.

You need the shell xtra, buddyApi and a working svn command line utility in order to use these SVN commands.

Feel free to drop me a line (or use the discussion forum of this project) in case you have trouble setting up the svn part.

Also note, that the commit message can not take any character at the moment. Read the paragraph at the top of this page about parameters.


Compare to SVN

Compare selected scripts with Working Copy…

Find the corresponding text file in your working copy and live-compare it using BBEdit. (Read the description of the Diff selected script command for what is meant by 'live-edit session in BBEdit.) This allows you to incorporate changes from or to the working copy and your movies version of the script and save it in BBEdit and have the changes brought into your movie.

Read about the convertLineBreaksToUnix parameter above

Export selected script to Working Copy and Open…

Export the selected script to working copy and open it in BBEdit. In BBEdit there is an excellent Subversion support, so you can track changes and do other svn related stuff in BBEdit. Basically this alows you to compare with arbitary revisions in the subversion repository, instead of the above command, which compares to your local working copy => the state of the script, when you last updated the svn working folder.

Read about the convertLineBreaksToUnix parameter above


Subversion SVN

The most used subversion calls to commit and update

SVN Update all castlibs

See comments on this page for SVN Update Current Movie…

SVN Update selected castlib(s)

See comments on this page for SVN Commit selected castlib…

SVN Commit selected castlib(s) and scripttext

See comments on this page for SVN Commit selected Castlib AND Scripttext…

Scripttext ex/import for SVN

Keep a copy of text representation of scripts as external single files, so the subversion version control system can do its magic.

Export scripts to SVN working copy…

Export the scripttext of the selected scripts to your local workig copy folder. Read the above description of my SVN approach to director

There are a few parameters: Read about the convertLineBreaksToUnix parameter above

Import script from file…

Import a script from file together with the castmember thumbnail, if a png of the same name is in the same folder. A file selection dialog is displayed, if the parameter thePath is left emmpty.


SVN Update ScriptText in Working Copy…

Call svn update using the shell on the working copy folder in order to update to the HEAD revision of the svn repository. I must confess, that I rather tend to use the shell directly to interact with the svn repository myself, instead of this command.


SVN Import Scripts, Text and Fields from working copy…

Import all from working copy folder. (Can't remember if thsi works, never use it)


SVN Commit ScriptText only…

Commit only the scripttext of the selected member. This exports the script to the working copy and then calls commit to repository using the svn command line utility.

It doesn't update the binaries (castlib), where this scripts resides in, so handle with care, the next binary update will overwrite the changes in your castlib, unless you incorporate the changes from the scripttext file in another take.

We use this much for changes, which we make to castlibs not owned by ourselves.

In order to avoid hassles with conflicts of files, which we edit at the same time, each developer collaborating on the same director project has its "own" external castlibs. As the castlibs are binary data, which can not be compared as strings line-wise it would not be possible to resolve conflicts. In the scripttext only files, there will only be a problem if two developers change the very same line in the same version. (As a rule of thumb, when working with subversion, commit and update as OFTEN as possible to avoid conflicts!) So if I amke changes to scripts, which are in castlibs, whcih do NOT belong to me, I only commit the scripttext and tell the "owner" of the castlib to incorporate the changes by getting my changes into his working copy (svn update) and then reading in my changes into his script (using Compare selected scripts with Working Copy for example) and then save and commit his castlib, so that the changes make it into the binary castlib. Then, when I next update my working copy folder, the castlib (binaries) will have the changes, which I made to the "other" developers script. A special case is every change made to the score (=> castlib internal), therefore the "score owner" has a special duty of keeping the movie up-to-date and incorporating all changes, which others make into the score.

Another rule of thumb is to avoid score work whenever possible. Use behaviors only as anchors on the sprites and make the work in parent scripts, which are bound the behaviors. The goal is to avoid the need to upadte the movie, when you work on your castlib, but rather only upadte your castlib!


SVN Delete Selected Scripts…

If you delete a script, text or field castmember, this change must be broadcasted to the local svn working copy folder. Therefore do not delete the castmember, but rather choose this command to delete it.

Otherwise you will need to delete orphaned files in your repository yourself using svn delete.


Fields and text ex/import for SVN

Keep a copy of text representation of scripts as external single files, so the subversion version control system can do its magic on text and fields too. Note that textmembers are saved as html files in order to preserve formatting as good as possible. (First I tried rtf, as they keep more of the formatting, but rtf members change with every save :-(

Export text members to SVN working copy…

Export the text of the selected field or the html of the selected #text members to your local workig copy folder. Read the above description of my SVN approach to director

Import text from SVN working copy…

Import text or fileds form local working copy folder in order to get the lates version form the repository.


SVN Import Scripts, Text and Fields from working copy…

Import all from working copy folder. (Can't remember if thsi works, never use it)


SVN -- binary director files

Binary director files are movies (.dir) and castlibs (.cst), as well as compressed or shocked files (.dxr, .cxt, .dcr, .cct)

SVN Update selected castlib…

Only import the currently selected castlib. This command replaces the currently open castlib, with the one found in the local working copy folder, after updating the local working folder using svn. So the movie will ask to save the changes before closing, in order to replace the file. Be aware of the fact, that changes to other castlibs are saved, while the changes to the selected castlib will get overwritten by the file from the local working copy folder.
UPDATE: There is also an optional parameter to specify the revision you want to update to. This can be an integer, specifying the revisions number or one of the recognized values of the update command of svn. These are:

  • NUMBER revision number
  • '{' DATE '}' revision at start of the date. Example: '{20081121}' would be 21. November of 2008. Please note the single quotes and the braces.
  • 'HEAD' latest in repository. Please note the single quotes.
  • 'BASE' base rev of item's working copy. Please note the single quotes.
  • 'COMMITTED' last commit at or before BASE. Please note the single quotes.
  • 'PREV' revision just before COMMITTED. Please note the single quotes.
SVN Update Current Movie…

Update the whole movie. All director movies and castlibs will get copied form the local working copy folder over to your current director Project folder, overwriting the files you see currently open in Director, after updating the local working folder using svn. Although a dialog will ask you if you want to save the changes, these changes will be overwritten, by the files of the working copy folder. You will be left with the version of the files from the working copy folder.
UPDATE: There is also an optional parameter to specify the revision you want to update to. This can be an integer, specifying the revisions number or one of the recognized values of the update command of svn. These are:

  • NUMBER revision number
  • '{' DATE '}' revision at start of the date. Example: '{20081121}' would be 21. November of 2008. Please note the single quotes and the braces.
  • 'HEAD' latest in repository. Please note the single quotes.
  • 'BASE' base rev of item's working copy. Please note the single quotes.
  • 'COMMITTED' last commit at or before BASE. Please note the single quotes.
  • 'PREV' revision just before COMMITTED. Please note the single quotes.

Be careful with these commands!


SVN Commit selected castlib…

Commit the currently selected castlib. This will copy the file form you current Director Project folder to your local working copy folder overwriting the version in your local copy and then call svn commit to commit the changes to the svn repository. A dialog will ask you for the commit text. You will need to enter someting as a commit text, as svn requires a commit message for very good reasons. Take the time to write a meaningful commit message, you and your coworkers will be happy later, if the messages do not all look like "some changes"

SVN Commit current Movie…

Do the above commit command SVN Commit selected castlib for all binries, director movie and castlib files. Read the above comments.


SVN -- binary AND text

These commands are the most often often used commands. They commit the binaries and the textfiles at the same time.

SVN Commit selected Castlib AND Scripttext…

This is the command I use myself most often in order to commit changes made to the castlibs I "own". The specified binaries (director castlibs) and all the scripts and text members found in those castlibs are exported to files in the local working copy folder and then commited using the svn commit command line call.

The parameter is a commit message and a selection specification. This can be a linear list specifying the number of the castlibs I want to commit. So when I want to commit castlib 3, 4 and 9, I enter [3,4,9] as vaue for "selection"

SVN Commit current Movie AND Scripttext…

Commits everything. All binaries and the scripttext and text from all castlibs are exported to the local working folder and then committed using svn commit command line call.


Misc.

Convert textmember to HTML + copy to clipboard

In order to publish lingo snippets on your website, copy the scripttext from the scripteditor into the clipboard, paste it into a #text member, which preserves syntax coloring and format and then call thsi command with the text member selected. This command will take the text members html and convert it to use inline CSS and put the result into your clipboard. So you can paste it into your html document and use the CSS definition in a n external file for your entire website.

Fix colors in scriptlists (SES 10 -&amp;gt; SES 9)

When authoring a movie with director version > 9 the colors in the gpdl are stored as color(r,g,b), which makes the otherwise backward compatible file incompatible with older versions of director. This handler corrects the values in the GPDL data of the score. Call this handler as a last step before saving your movie, if you want to open it later in D8, D8.5 or D9.


Unix path

Convert path from HFS to UNIX

Takes a HFS path with : as pathdelimiter statring with the name of the volume, to a UNIX like path, using / as path delimiter starting at /Volumes/(name of the volume)/...

Convert path from UNIX to HFS

Convert a unix like path to HFS


Castmember Thumbnails

Make castlib label…

Create a label for a castmember. Enter text and background color. Hold down the option/ALT key for bold text. The value for text can be either a string or an imag object (using a global variable)


Open containing folder in Finder

Open the movie project folder in the Finder/Explorer.