# Combining Scripts

The purpose of the script-combining window is to combine two or more animation scripts into a single script. For example, a script controlling the view and a script controlling a vehicle can be merged to produce a script controlling both.

The entry box under the Combine Scripts label is used to type in the names of the script files to combine. When the `Return` key is pressed, the file name is appended to the list of names in the list box immediately below the entry box. File names can be removed from the list box by clicking on the name with the left mouse button.

On the right side of the window is an entry box which contains a a filter string. By default, the filter string is `./*.script`, identifying all files in the current directory with the `.script` suffix. The files which match the filter are listed in the list box immediately below the filter string. The filter string can be keyboard edited, and the list of files is regenerated when the Filter button is pressed.

To add file names in the Filter list box to the Combine Scripts list box, the user can click on the desired file name with the left mouse button.

The entry box labeled Create script contains the name of the file that AnimMate will create by combining the scripts in the Combine Scripts list box.

The following buttons appear at the bottom of the window:

OK
  When this button is invoked, a new script is created by combining the scripts listed in the Combine scripts list box. The name for the new script comes from the Create script entry box. If a file with this name already exists, the user is given the choice of overwriting the old file or cancelling the operation.

  Depending on the size of the input files, the sorting algorithm may take a few seconds to complete. The sorting is performed in the background so that the user can continue working during the sort. A message is posted at the bottom of the window to let the user know that the scripts are being combined, and a Halt button is posted to allow the user to cancel the operation mid-way. Only one sort may be active at a time. When the operation is complete, the message and Halt button disappear.

Show Script
  This button pops up a window for running the new script in the MGED display window.

Up
  This button raises the parent of the script-combining window to the top of the stacking order.

Cancel
  This button closes the script-combining window.

Next Section: Show Scripts

Previous Section: Track Animation

Index