Load Command

The Load command will load subroutine templates or an internal script with subroutines into the start of a primary template or internal script.

Load #1,<#2>,<#3>, ...

where

For templates, the names are of subroutine templates in the browser style. For internal scripts, the names are of other internal scripts and must omit the file's ".gcscpt" extension. If a name includes spaces, enclose the name in quotes. The load command looks for the requested internal scripts in the extension, in the "Modules" folder in the user section of application support files, and in the "Modules" folder in the system section of the application support file (in that order) and the first one found is used; see GEDitCOM II help information for organization of application support files. Extensions intended to run in both GEDitCOM and GEDitCOM II should only load internal scripts in the extension or in the system section of the application support files (GEDitCOM does not support a user section for "Modules").

You can load multiple subroutine templates or internal scripts using one Load command with all names or using multiple Load commands with one or more names on each one.

Notes

  1. GEDitCOM and GEDitCOM II provide two modules — GEDitCOMII and MappingUtilities — that can be loaded into any Internal Script.
  2. The Load command in internal scripts for GEDitCOM II requires version 3.1. The option to load internal scripts in "Modules" folders requires version 3.2, build 3.
  3. One Load command (which can load multiple templates) in browser styles works in any version, but using multiple Load commands for GEDitCOM II requires version 3.1.
  4. All Load commands must be before any other commands in the template or script (comments can be before or in between the Load commands).
  5. The loaded code can only contain subroutines and it can contain any number of subroutines. It cannot contain its own Load commands.
  6. The loaded subroutines are embedded in the code, which means they will share global variables (unless the call method is is changed) and all resulting subroutines names must be unique. Duplicate subroutine names will cause an error.
  7. If an internal script error occurs in a loaded subroutine, the error message will report the line number of the "Load" command, but will also include a list of subroutines calls that caused the error.