FindAll
©02 Alex da Franca -- alex@farbflash.de
version 1.1 (07 May 2007)
  • FindAll is an Authoring-Xtra for Macromedia Director (version 8 and higher)

  • Provides a search through all of your scripts for a given expression (regular expression optional) and lists all occurrences found
  • Provides replace functions (regular expression optional) to either replace all occurrences or only the selection in the list you obtain with 'Find All'
  • Search/replace in #text and #field members
  • Search/replace in names and comments
  • Search/replace in behavior initializers
  • Select all occurrences of the selected castmember in the score

In fact FindAll doesn't require other Xtras, but in order to take advantage of all functionality you need the following:

In order to open the script editor and highlight the match (clicking on a match in the list) the UIHelper xtra (Win: JavaUiHelper.x32) is required
The UIHelper Xtra is one of the standard Xtras, which were delivered with Director until version 8, as part of the 'save as java' xtra components.

The UIHelper xtra is also in the standardinstall of Directoppr MX and MX2004

Director 8.5 is missing the xtra, but fortunately the UIHelper Xtra from version 8 works with 8.5 as well.
If you use FindAll with D 8.5, copy the UIHelper Xtra from previous versions over to your D 8.5 Xtras folder.
Note: You need to have the java components installed in Director 8 for the UIHelper Xtra (Win: JavaUiHelper.x32) to appear in your xtras folder. You'll find the installer on your D8 CD
(Mac: run 'Install Java Components' from the rootlevel of the D8 CD;
Windows: run setup.exe which is contained in the folder 'Java Components' on the root level of the D8 CD)

The PRegEx Xtra is required, if you want to search/replace using regular expressions.
Also it speeds up the search/replace.
IMHO it is one of the must-have Xtras for director.
It is an open source project and free to use. Get the xtra at http://openxtras.org/
MANY, MANY, MANY THANKS to Chris Thorman and Ravi Singh for this great Xtra !!

  • Download and unstuff

  • Move the file FindAll.dcr to your Director Xtras folder, in order to make it appear in your xtras menu in the authoring environment.

  • Restart Director and choose "FindAll" from the "Xtras" menu

The button 'Find All' adds a functionality, which I always wished for director.
It lists all occurrences of the searchstring instead of repeatedly needing Cmd-G...
In the same dialog you have the option to 'Replace All', which does the same as directors 'Replace ALL' except that it can use regular expressions.

You can choose in which strings you want the search to happen: the scripttexts of your movie, the text- and fieldmembers, the names or comments of the members or the behavior initializers.

The recent terms you used for searching or replacing are provided in a drop down menu.

You can constrain the search to the selected members only.

You can choose to skip comments in scripts

You can choose to search case sensitive.

You must confirm the change for each scriptmember. After the first confirm another alert comes up giving the option to 'Say Yes to All' and all members get changed without further alert.

After a search with 'Find All' a list will be displayed with all the matches found listed by scriptmember, handler and line number.
You can expand/collapse the listing entries by either clicking on the triangle next to the list entry or doubleclick on its name. Holding down the Option key while expanding/collapsing a hierarchie, expands/collapses all subentries.

Move the mousecursor over an item for a tooltip with the context of the match.

You can click on a match to open the member and highlight the matched chunk.

Cmd-click on an item to select it and all its subnodes in the cast (score in case of GPDL)

You can select one or several matches (hold down the shift key for multiple selection) to mark them for replace. The 'Replace' button is available as soon as something is selected.

The 'Replace' button only replaces the selected items with the expression you enter in the upcoming dialog. Selecting a handler name replaces all occurrences inside the selected handler, as well as selecting a script member name replaces all occurrences found in this script.

Since I used the PRegEx Xtra there is also the option to search/replace using a regular expression.
Please read in the docs of PRegEx what a regular expression is and how to use it.

 

The button 'Select in Score' selects all occurrences of the first selected castmember in the score. Unlike directors own function ALL occurrences are selected at once. This can be handy for replacing all members or changing the behavior initializers of all sprites with the selected behvior attached at once.

 

The button 'New instance' opens a new instance of the FindAll window, so that you can work with the results of different searches. Note, that this functionality on the Windows platform only works, if the xtra file is set to read-only. Right click the file 'FindAll.dcr' in your xtras folder and choose 'Properties'. In the dialog select 'read-only'.

  • IMPORTANT NOTE!
    This movie calls the sleep method of the UIHelper xtra on idle, as otherwise the CPU usage would permantly be very high and not only consume my powerbook battery power, but also heat the computer up and make the fan spin as if there is no tomorrow. In order to avoid that stupid behavior I spin the performance down making the engine release the cpu for 1 tick on mac (1/60 second) and 1 millisecond on a windows PC on every idle event. This impacts the playback speed of your movie too. So keep in mind, to close the tool miaw, if you make performance tests with your movie.
Help:

In case you may want to support my work via paypal donation... PayPal...