Running Scripts


Mira provides a number of ways to run a script. The method to use depends on whether the script opens images from files, accesses displayed images or plots, or does not use any image data at all. Choose the method that applies to your script and target data:

The script does not work with images or plots

  1. Open the script into a Script Editor.

  2. Run the script by clicking on the Script Editor's toolbar.

The script opens one or more images from a file.

  1. Open the script into a Script Editor.

  2. Run the script by clicking on the Script Editor's toolbar.

The script selects the target Image or Plot from open windows.

  1. In the script, use the CImageView: AttachFromList() or CPlotView:AttachFromList() method to select the target window from among the open windows.

  2. Open the script into a Script Editor.

  3. Run the script by clicking on the Script Editor's toolbar.

The script works with the top-most window, which is an image window or plot window:

a. The script is open in a Script Editor:

  1. Any number of image windows, plot windows, or other windows are open. The desired script must be open in a Script Editor.

  2. In the script, use the CImageView: Attach() or CPlotView:Attach() method to connect the target Image window or Plot window to the script.

  3. Bring the target Image window or Plot window to the top of the stack (i.e., make it top-most). This causes the script to move behind the new Image or Plot window which becomes top-most.

  4. Run the script by clicking the  button on main toolbar. If other script windows are also open, Mira will open a list of open scripts from which to choose.

b. The script is not open:

  1. Make the target Image window or Plot window top-most.

  2. Open the Script Manager and select the desired script.

  3. Run the script by clicking the [ Run ] button on the Script Manager dialog.

Related Topics

Working with Scripts, Script Editor, Script Manager