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
Open the script into a Script Editor.
Run the script by clicking on the Script Editor's toolbar.
The script opens one or more images from a file.
Open the script into a Script Editor.
Run the script by clicking on the Script Editor's toolbar.
The script selects the target Image or Plot from open windows.
In the script, use the CImageView:Attach() or CPlotView:Attach() method to select the target window from among the open windows.
Open the script into a Script Editor.
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:
Any number of image windows, plot windows, or other windows are open. The desired script must be open in a Script Editor.
In the script, use the CImageView:Attach() or CPlotView:Attach() method to connect the target Image window or Plot window to the script.
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.
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:
Make the target Image window or Plot window top-most.
Open the Script Manager and select the desired script.
Run the script by clicking the [Run] button on the Script Manager dialog.