Script menu commands
The Script menu offers the following commands for controlling scripts:
|Run||Opens submenu for running scripts|
|Run 1, 2, ...||Runs a script.|
|Stop||Stops script at next command.|
|End||Stops script at end of loop or repeat.|
|Resume||Resumes script at place where it stopped.|
|Toolbar||Opens a toolbar with buttons for all scripts.|
|Set Height||Sets the number of buttons and button height in the script toolbar.|
|Controls||Opens dialog box to set conditions for stopping a script.|
|Edit 1, 2, ...||Opens a window for editing a script.|
|Load Many||Loads all scripts in a file into their given script numbers.|
|Save All||Saves all current scripts into a file.|
|List Functions||Lists all functions defined in scripts.|
|Clear Persistent Vars||Clears all persistent variables defined by scripts.|
|Set Indent Size||Sets number of spaces for automatic indenting in editor.|
|Verbose||Toggles echoing of each line at start of script.|
For a list of available script entries, see Script Commands; for general information about scripts see About scripts.
Run commands (Script menu - Run submenu)
Use one of these commands to run a selected script.
Stop command (Script menu)
Use this command to stop a running script.
End command (Script menu)
Use this command to stop a running script at the end of a loop or the end of the script (before repeating). In addition, when a script is run from the Navigator, the End command can be used while the script is stopped to terminate that script and let the Navigator go on to acquire at the next point.
Resume command (Script menu)
Use this command to resume a script that was stopped with the Stop or End command. If you want to start a script from the beginning, run it rather than resuming it. The next command in sequence will be executed if you stopped with End. If you stopped with STOP, the program will show you the line that it stopped on and ask whether you want to redo this command or go on to the next. In some cases a script that stops because of an error condition can be resumed from the point at which it stopped; the program will resume from either the current or next command as appropriate for the type of error.
Toolbar command (Script menu)
This command opens a small panel with buttons for all scripts, or as many are specified with the Set Length command. The buttons are wide enough to allow somewhat longer script names than in the Camera & Script Control Panel. Individual buttons will be enabled when a script is available to run or when it is open in an editing window. You can open an editor window for any existing script by holding down the Ctrl key while pressing the button. If you lose the toolbar behind other windows, invoke this menu command again to raise it. The program will remember this window's position and whether it is open between sessions.
Set Height command (Script menu)
Use this command to set the number of buttons in the script toolbar, and their height in pixels. Initially, the toolbar will have 10 buttons. The button height can be increased if the buttons seem too narrow to select reliably. Enter a height of 0 to return to the initial height.
Controls command (Script menu)
Use this command to open the Script Controls dialog box in order to set conditions for stopping a script. The script can be stopped when the stage reaches a certain tilt angle, image intensity falls below a certain level, image shift exceeds a certain amount, montage error is too large, or the script has repeated a given number of times.
Edit command (Script menu)
Use one of these commands to open a Script Editing Window for editing the given script. Use the left or right 'Editor ' arrows in the editing window to get to higher numbered scripts other than 15 and 20. You can also open an editor for an existing script by holding down the Ctrl key and pressing a button for the script in the Script Toolbar or in the Camera & Script Control Panel.
Load Many command (Script menu)
Use this command to load multiple scripts from a file and place them into their respective script numbers. These scripts must have been saved so that each one starts with a line with 'Macro' and the script number, and ends with the line 'EndMacro'. This is the way scripts are stored in a settings file as well as by the Save All command, so this command can be used to read only the scripts from a settings file. However a single script saved from the editing window cannot be read with this command because it does not have these starting and ending lines.
Save All command (Script menu)
Use this command to save all currently defined scripts into a single file. They are saved with script numbers, just as in a settings file, so that when this file is read, scripts will go back into the same locations.
List Functions command (Script menu)
Use this command to get a list in the log window of all functions defined in all scripts. The function name will be followed by the number of arguments and 0 or 1 for whether it takes a string argument.
Clear Persistent Vars command (Script menu)
Use this command to clear all of the persistent variables that have been defined by previously run scripts. This will make a stopped script non-resumable.
Set Indent Size command (Script menu)
Use this command to set the number of spaces that the script editor will use for auto-indenting when Tab or ` (the back-tick character) is typed. This spacing is added at the first line of a block starting with IF, LOOP, ELSE, or Function, and taken away when such a block ends. Enter 0 to prevent auto-indenting.
Verbose command (Script menu)
Use this command to set the initial value of the verbose option when a script is started. With this option on, each script command will be echoed to the log before being executed. The option value can be changed by the Verbose command within a script.