Scripts in An Extension

An extension is a package of one or more scripts. This help topic explains how to work with various types of scripts.

Add a Script to an Extension

There are two ways to add a script to an extension:

  1. Use the "Import Files..." menu command and select the scripts. You can import Internal Scripts, AppleScripts, or Python scripts. These files have extensions .gcscpt, .scpt, .applescript, .py, or .rb.
  2. Use the "New Script..." menu command and enter script name with extension .gcscpt, .py, or .rb. This method creates an empty script and can only create Internal Scripts or Python scripts. AppleScripts have to be imported.

Edit Scripts in Extensions

To edit Internal Scripts or Python scripts, expand the "Scripts" section and click on the script name. The script will appear in the right side of the window and be available for editing.

You cannot edit AppleScripts in GEDitCOM Editor and they will not appear in the "Scripts" section. Instead, AppleScripts appear in the "other files" item in the "Properties" section. To edit an AppleScript, select the "other files" and then double click on the script name. It will open Apple's Script Editor for editing. Note that editing a file in two applications at the same time can confuse the MacOS. It may complain when you save a script in Script Editor or when you save the extension in GEDitCOM Editor. You can usually ignore those complaints and save anyway. To be safest, you should do all edits possible in GEDitCOM Editor first, save those results, and then work on editing scripts in Script Editor.

Change Name of a Script

To change the name of an Internal Script or a Python script, double click the name in the "Scripts" section and enter the new name (making sure to maintain the proper file extension).

To change the name of an AppleScript:

  1. Open the "other files" item in the "Properties" section
  2. Double click the value field next to the script name you want to change and enter the new name (making sure to maintain the proper file extension)
  3. Save the extension
  4. Close and reopen the extension to have the new name