Main Help → Using the GEDitCOM Editor → Script Editing Workspace
The "Script Editing Workspace" is for editing (and testing) individual Internal Scripts or Python scripts for GEDitCOM II. Since GEDitCOM II, version 2.0, all such scripts should be packaged in extensions. The script editing workspace is therefore mostly used for editing and writing modules (open them in the "Script Editing Workspace"") or for testing out scripts before moving them to an extension. The workspace is opened as follows:
- To open the script editing workspace use the "File→Script Editing Workspace" menu command in the "File" menu. The workspace window will open and all Internal Scripts or Python scripts available for editing will be on the left side of the window. The script workspace will remember which scripts were opened the last time the workspace was used.
- Alternatively, you can open any Internal Script (file with extension
.gcscpt) or Python script (file with extension.py) using the "File→Open" menu command. The selected script will be opened and loaded into the the script editing workspace, which will be opened if not already open.
Once opened, you can open any number of scripts to the workspace list on the left. To edit any script, click on the script and edit the text. Editing is done with standard MacOS text editing methods. Selected keywords and comments will be colorized to help in the editing process. For convenience, each new line will start at the indent of the previous line.
Some options when working on scripts are:
- To run any script in GEDitCOM II, use the "File→Save and Run" command (⌘-R) or click the run arrow in the tool bar. The script will be saved, control will switch to GEDitCOM II, and the script will be run. If an error occurs, the error message will appear in GEDitCOM II's scripting panel.
- To create a new script, use the "New Subroutine/Script" menu command.
- Use "Template→Close Script" to remove a script from the workspace. It will still be saved in its script file on disk.
- To close the entire workspace, use the "File→Close" menu command.
- The "Template→Search Scripts" menu command can search for text in any opened script by methods similar to searching templates. Use standard find and replace methods to just find text in the current script being editing.
- The "File→Save" and "File→Save As..." commands save the current script being edited in the work space. The "Save As..." command is the only way to rename a script.