Main Help →
Writing Extensions →
Internal Scripting →
Scripting Objects Dictionary
Dictionary of Internal Scripting Objects
Internal scripts work with objects internal to GEDitCOM II and with some special objects available only to internal scripts. This page documents all possible objects. See the sections on Object Attributes and Object Properties to learn about options available to objects and how to access or change them. The possible objects are in the following list. Each object type lists their attributes, properties, and supported commands in alphabetical order.
Note that when writing AppleScripts or Python scripts, one often refers to the AppleScript dictionary for GEDitCOM II that you can open with Apple's ScriptEditor application. This page replaces that dictionary for Internal Scripts. Many of the items are the same, but some are described more fully here and all are given by the format used in internal scripts. Internal Scripts also have many object options not easily available to AppleScripts or Python scripts.
Object Attributes
Objects, which are instances of a certain class type, are defined in Internal Scripts using object names and those names can be used get object attributes and to get and set object properties. Unless otherwise stated, all attributes and properties are available in GEDitCOM II, 3.0, build 2 or GEDitCOM 1.0; those that differ are indicated with "(since x.y/a.b)" where "x.y" is the "GEDitCOM II" version needed and "a.b" is the "GEDitCOM" version needed. The attribute styles, which are common to all object types, are as follows:
- To-many object lists
- Objects many be connected to a list of other objects. To get one of these lists, use an object assignment or a get command. For example
@indis = "gdoc.individuals"
gdoc.get indis,"individuals"
gets a list of individuals in a document (with object name gdoc) and assigns object name indis to the list. Lists returned by to-many relations will either be a GC List or an Internal Scripting list. The returned result will always be a list and it will be an empty list if the object does not have any of the requested objects. You can check the length of any list with @indis.count You can refer to information on objects to learn how to access objects in these lists.
Note that a returned GC List is the actual list being used by GEDitCOM II, and not a copy. If the items in that list are deleted or get reordered due to some commands in your script, the list in the script will change as well. To avoid unexpected changes in such a list, you can make a copy as follows:
@indis = "gdoc.individuals"
CreateList recs
recs.addList indis
The resulting list in recs then has a copy of all individual records that will remain constant while running the script.
"To-many object lists" are currently not settable.
- To single objects
- Objects may be connected to one type of object. To get one of these objects, use an object assignment or a get command. If any "to-single" object is not found, both methods will return a special None object that can the checked using the ifDef or ifNDef commands or by the class of the returned object. For example, if
indi is an individual, you can check for the father record with:
@indi = "indi.father" ! or use indi.get fath,"father"
ifDef fath
! work with father record in fath
endif
or
if @fath.class!="none"
! work with father record in fath
endif
"To single objects" indicated as "sets" can be set:
wind.set "bounds",objVar
where objVar must be the object name for the expected type of object (it must be object name not an object specifier (currently, window bounds is the only "To single object" that can be set).
Getting Object Properties and "@" Expressions
Object properties are strings or numbers related to the object. Each property can be read with an "@" expression, having generic form:
#prop = @(object).(property)
where (object) is an object specifier (although its (root) can use array variables, when used in an "@" expression, the index for the array cannot use an expression, i.e., can use #ref[3] but not #ref[#i]). The object specifier finds an object and the result of the "@" expression will be the requested (property) of the found object. A valid "@" expression can be used within any expression as the string or number given by the final (property). Some examples are:
#name = @fam.husband.name ! name of husband in family record in object fam
#name = @gdoc.individuals.@I329@.children.2.firstName ! first name of 2nd child of individual
where fam is a object of a family record and gdoc is object for a document.
If any element of the Object specifier returns a None object the result of the "@" expression will be an empty string. For example:
#mother = @indi.mother.name
where indi is an individual record object. If that individual does not have a known mother, @indi.mother will be a None object and the expression will return zero-length string instead of causing an error (note: prior to 3.5/1.0, a None object in a "@" expression would cause en error). A error only occurs in the following conditions:
- If a valid GC List or List is followed by number, ID, or name that does not find an object or string in the list.
- If a valid Dictionary is followed by a key that is not in the dictionary (you can trap this error using valueForKey command).
- If any other valid object is followed by an
(atom) or (property) that does not correspond to a defined attribute or property of that object (usually a typo in writing the script).
List and Dictionary Examples
Here are some examples accessing a GC List or List. The expression can find an item in a list. If that item is an object, the expression can continue to a property or attribute of that object:
CreateList numbers,"One","Two","Three,"Four"
#num = @numbers.2 ! becomes "Three"
#bd = @indis.100.birthdate ! birth date of 100th individual
Here are some examples for a Dictionary. The expression can find an value by key. If that item is an object, the expression can continue to a property or attribute of that object:
CreateDictionary dict
dict.setStringForKey "key value","string"
dict.setObjectForKey indi,"person"
#test = @dict.string ! becomes "key value"
#name = @dict.person.name ! name of individual in object indi
Notes
The option to link objects by this style only available since 3.3/1.0. Internal Scripts for older versions could only use "@" expressions with a single object in one (atom) or a list object followed by second (atom) to select an item from that list. For example:
#name = @indi.name ! single object allowed
CreateList numbers,"One","Two","Three,"Four"
#num = @numbers.2 ! select item from list in first atom is allowed
All other styles are invalid prior to 3.3/1.0. Version 3.5/1.0 also enhanced some options allowed in object specifiers.
Setting Object Properties
Properties can also be set using an "@" expression with the following syntax
@(object).(property) = (expression)
where (object) is a valid object specifier and (property) is the object's property to be set to string or number from the expression on right side of the equation. The results depend on (object) type:
- If
(object) is a List and (property) is number, ID, or name that finds an item in the list, that item will be replaced with the expression value. This setting method can only set items as strings. Use other List commands to work with objects in a list. This command will cause an error if a number is out of bounds for the current list (although it can be equal to length of the list, which appends the value to the list without removing an item).
- If
(object) is a Dictionary, this command will add the expression value to the dictionary using key given by (property). This method of adding values to dictionaries can only add strings. Use other Dictionary methods to add objects or numbers to dictionaries.
- For all other objects, this command will set the provided
(property) to the expression value. An error will occur if (property) is a read-only property or is an invalid property.
Notes
Prior to 3.5/1.0, properties that are not designated as read only (or "r/o") could only be set using the set command:
indi.set "birthDate","4 July 1776" ! same as @indi.birthDate = "4 July 1776"
where property name is first and the new value is second. This set command still works, but the '@' expression approach is easier and more intuitive.
Genealogy Application
This object is the main GEDitCOM II or GEDitCOM application. It is automatically assigned to object name gcapp when an internal scripts starts. Many places in this documentation, refer only to GEDitCOM II, but unless specifically stated all features work in both GEDitCOM II or GEDitCOM.
Inheritance
To-many object lists
- documents : an ordered GC list of opened documents. Item 0 is the front most document.
- windows : an ordered GC list of opened windows. Item 0 is the front most window (note that if a script creates new windows, MacOS Ventura (or newer) might not return front-most window in item 0).
To single objects
- frontDocument : the front-most opened document
- None : returns a None object that is sometimes useful as place holders for objects (which can later be found with ifDef or ifNDef commands or by the object's class="none") (since 3.3/1.0).
- screenRect : left, bottom, width and height of the main screen in a list (since 3.2/1.0)
Properties
- betaNumber (r/o) : The current beta number for GEDitCOM II or 0 if an official release
- buildNumber (r/o) : The current build number for GEDitCOM II
- class (r/o) : equal to "application"
- currentFormat (r/o) : The full path to the current browser style (without the
.gpkg and may start with $SYSTEM/ or $USER/ for browser style in the system or user library)
- formatLanguage (r/o) : The current user-selected language for the browser style
- hasFontName : Replace "Name" in this property with any font name (e.g., hasFontTimes) and this property is "Yes" if that font is available or "No" if not (since 3.3/1.0).
- mappingAPI (r/o) : Mapping API (0=google, 1=openlayers)
- messageVisible : The current visibility of the panel that appears while running scripts
- name (r/o): Application name will be "GEDitCOM II" or "GEDitCOM" in case special handing for running a specific script in both applications.
- scriptMessage : A message set by a template in a user interface format that can be read by internal scripts used in that interface format.
- version or versionNumber (r/o) : The current version number of GEDitCOM II
- volume : Set master computer volume from 0 to 1
- workspaceFolder: The full path the the genealogy workspace folder for "GEDitCOM" but will be empty when running "GEDitCOM II" (since 3.1/1.0)
Supported Object Commands
(return to Object Index)
Genealogy Document
An opened GEDitCOM II document (files with extension gpkg) containing genealogy data.
Inheritance
To-many object lists
To single objects
- keyRecord : A single record relevant for the front-most window in the document. For most windows, it is simply a selected record, but for family tree windows, it is the root record in the tree (even if a different record is selected).
- parentStructure : The parent GEDCOM Object relevant to the front-most window in the document. When viewing a record, it is the same as keyRecord, but when viewing a child window containing a subset of data (such as when viewing event details in a child window in the "Default Format"), it is the GEDCOM Structure for that event (since 3.2/1.0).
- recordWithID@264@: The gedcomRecord with ID in the text following "recordWithID".
Properties
- class (r/o): equal to "document"
- folder (r/o): The folder containing the document's file (or "" if it has never been saved) without the final separater slash (since 3.1b4).
- homeRecord : Home record ID. When setting (by ID), that record becomes the main home record and other home records are pushed down the list of 10 additional home records. If no room left in the list, the last one is removed.
- mainSubmitter : Main submitter record ID
- modified (r/o): "true" or "false" if document has unsaved changes
- name (r/o): The document's file name (or "Untitled" if it has never been saved)
- path (r/o): The document's file path (or "" if it has never been saved)
- printing (r/o) : "true" or "false" if printing in progress
- saving (r/o): "true" or "false" if saving in progress (since 3.2/1.0)
- selectedText : Selected text in the front browser window
- windowType (r/o) : The type of the front most window for this document
Supported Object Commands
(return to Object Index)
GEDCOM Object
This abstract object is not ever used in the script. It defines relations, properties, and commands that are shared by gedcomRecords and structures.
Inheritance
To-many object lists
- citations : a list of all source records at the next level in this structure.
- gedcomArray (r/o) : a list which each item being a GC list for one line of GEDCOM data starting with the object and including all subordinate GEDCOM data at higher level. Each GC list will have three items for (level, tag, contents) of that line. The first line for a GEDCOM record will be (0, record ID, record type) (since 3.2/1.0).
- logs : a list of all research log records at the next level in this structure.
- notations : a list of all note records at the next level in this structure.
- objects : a list of all multimedia records at the next level in this structure.
- structures : a GC list of all subordinate structures for this parent structure.
To single objects
Properties
- firstLine (r/o) : GEDCOM text for first line of the structure (level, tag, and line value) with line ending character
- level (r/o) : Structure level number
- tag (r/o) : GEDCOM tag. It is a property that works for both GEDCOM Records (and is same as its recordType) and GEDCOM Structures (and is same as its name).
Supported Object Commands
(return to Object Index)
GEDCOM Structure
A GEDCOM structure that consists of a parent line (with level, tag, and contents) and any subordinate structures under that line at higher level number.
Inheritance
To-many object lists
To single objects
- eventLonLatBounds : for event or attribute structures, returns list with
[lon,lat,horiz,vert] for longitude and latitude of south-west corner of a bounding box for the event with east-west width horiz and north-south height vert (in degrees). The code looks first for a subordinate _GPS tag. If that is not found, it looks for bounds of the linked place record. If nothing is found, it returns None (since 3.2b4/1.0)
- nextStructure : the next GEDCOM structure at the same level as the current structure.
- parentStructure : the parent GEDCOM structure or the current structure.
- prevStructure : the previous GEDCOM structure at the same level as the current structure.
Properties
- class (r/o) : equal to "structure"
- contents : The line value of the first line of the structure
- eventCountry (r/o) : Country in subordinate place (assumed to be last item in comma separated place elements) (since 3.5/1.0)
- eventDate : Subordinate date (GEDCOM style) for this structure
- eventDatePlace (r/o) : Subordinate date (GEDCOM style) and place for this structure (since 3.5/1.0)
- eventDateUser (r/o) : Subordinate date (user-preferred style) for this structure
- eventDateUserPlace (r/o) : Subordinate date (user-preferred style) and place for this structure (since 3.5/1.0)
- eventPlace : Subordinate place for this structure. Note that changing this place with a place name that does not already exist in the file may disrupt place handling in the file. Two solutions are to close and reopen the file or make sure you create a place record to match the new place name as well.
- eventPlacePlusAddress (r/o) : Subordinate place and address for this structure
- eventSDN (r/o) : Minimum subordinate date as serial day number (0 if no date or invalid date)
- eventSDNMax (r/o) : Maximum subordinate date as serial day number (0 if no date or invalid date)
- eventYear (r/o) : Year from subordinate date for this structure (since 3.5/1.0)
- eventYearCountry (r/o) : Year from subordinate date and country from last element in subordinate place (since 3.5/1.0)
- gedcom (r/o) : Raw GEDCOM data for the entire object including all subordinate structures.
- memo : A memo on first line of this structure
- name : Structure's GEDCOM tag word in its first line
Supported Object Commands
(return to Object Index)
GEDCOM Record
The base class for all GEDCOM records that defines all relations, properties and commands shared by all other types of GEDCOM records.
Inheritance
To-many object lists
To single objects
Properties
- alternateName (r/o) : Alternate record name, but may be same as name property. For individual records it is "first last" name order
- class (r/o) : All GEDCOM Record objects in internal scripts are subclasses of this class as given by their class property (e.g. "INDIRecord", "FAMRecord", etc.).
- connected (r/o) : "true" if record is connected to another record or "false" if not. A connection depends on record type. For example, an individual is connected if it is linked to at least one family record and a family record is connect if it has at least one family member (spouse or child).
- contextInfo : This property is provided for use by scripts allowing them to store any information on a record and retrieve it later during the script. A script should always clear the
contextInfo of all records before using it with the clearContextinfo command.
- gedcom : Raw GEDCOM data for the entire record (use caution when setting and note that setting it cannot change the record type or the record ID)
- id (r/o) : GEDCOM record ID
- name : Name of the record, which will depend on record type. For individual records it is "last, first" name order
- recordType (r/o) : All GEDCOM Record objects in internal scripts are subclasses of this class with a given recordType property (e.g.,
INDI, FAM, etc.).
- restriction (r/o) : This record is "unlocked," "locked," "confidential," or a "privacy" record. Only individual and family records can be restricted.
Supported Object Commands
(return to Object Index)
Individual Record
A GEDCOM Record documenting a single individual with record type INDI and class type INDIRecord.
Inheritance
To-many object lists
- children : a list of individual records for children of the individual
- parents : a list of individual records for parents of the individual
- parentFamilies : a list of family records for all parents of the individual including family records with step mother or father.
- spouseFamilies :a list of family records for all spouses of the individual
- spouses : a list of individual records for spouses of the individual
To single objects
- father : individual record for father if the individual
- mother : individual record for mother if the individual
Properties
- alternateName (r/o) : Individual's name as "first last"
- alternateNAME (r/o) : Individual's name as "first LAST" or uppercase surname
- birthDate : The birth date (GEDCOM style) for the individual
- birthDateUser (r/o) : The birth date (user-preferred style) for the individual
- birthPlace : The birth place for the individual. Note that changing this place with a place name that does not already exist in the file may disrupt place handling in the file. Two solutions are to close and reopen the file or make sure you create a place record to match the new place name as well.
- birthPlacePlusAddress (r/o) : The birth place and address of the individual
- birthSDN (r/o) : Minimum birth date as serial day number (0 if no date or invalid date)
- birthSDNMax (r/o) : Maximum birth date as serial day number (0 if no date or invalid date)
- class (r/o) : equal to "INDIRecord"
- deathDate : The death date (GEDCOM style) for the individual
- deathDateUser (r/o) : The death date (user-preferred style) for the individual
- deathPlace : The death place for the individual. Note that changing this place with a place name that does not already exist in the file may disrupt place handling in the file. Two solutions are to close and reopen the file or make sure you create a place record to match the new place name as well.
- deathPlacePlusAddress (r/o) : The death place and address of the individual
- deathSDN (r/o) : Minimum death date as serial day number (0 if no date or invalid date)
- deathSDNMax (r/o) : Maximum death date as serial day number (0 if no date or invalid date
- firstName (r/o) : The individual's first name
- lifeSpan (r/o) : Life span in years as "birth-death" if either are known. Death year will be "?" if no death year but death event is checked as "has occurred" or if current age is found to be greater than 110 years.
- middleName (r/o) : The individual's middle name
- name : Individual's name (last, first), but can set using "last, first" or "first last" and with or without slashes around the surname
- recordType (r/o) : equal to "INDI"
- sex : Sex of an individual (M or F or U), but cannot set the sex if the individual is a spouse in a family record
- surname (r/o) : The individual's surname
- surnameSoundex (r/o) : Soundex code for the individual's surname
Supported Object Commands
(return to Object Index)
Family Record
A GEDCOM Record documenting a single family group (one or two spouses and children) with record type FAM and class type FAMRecord.
Inheritance
To-many object lists
- children : a list of individual records for all children in the family
To single objects
- husband : individual record for the husband in the family
- wife : individual record for the wife in the family
Properties
- alternameName (r/o) : the husband and wife names using "first last" format
- class (r/o) : equal to "FAMRecord"
- marriageDate : The marriage date (GEDCOM style) for the family
- marriageDateUser (r/o) : The marriage date (user-preferred style) for the family
- marriagePlace : The marriage place for the family. Note that changing this place with a place name that does not already exist in the file may disrupt place handling in the file. Two solutions are to close and reopen the file or make sure you create a place record to match the new place name as well.
- marriagePlacePlusAddress (r/o) : The marriage place and address for the family
- marriageSDN (r/o) : Minimum marriage date as serial day number (0 if no date or invalid date)
- marriageSDNMax (r/o) : Maximum marriage date as serial day number (0 if no date or invalid date)
- name (r/o) : the husband and wife names using "last, first"
- recordType (r/o) : equal to "FAM"
Note than alternateName and name are inherited from gedcomRecord and combines husband's and wife's names in two style, but they are changed to be read only properties.
Supported Object Commands
(return to Object Index)
Place Record
A GEDCOM Record documenting single place. It is a custom record defined in GEDitCOM II with record type _PLC and class type PlaceRecord.
Inheritance
To-many object lists
- referencedBy : a list of record IDs that reference this place record.
To single objects
- lonLatBounds : returns list with
[lon,lat,horiz,vert] for longitude and latitude of south-west corner of a mapped bounding box with east-west width horiz and north-south height vert (in degrees). If a place has multiple maps, it returns results for the first one that has a bounding box. If no bounding boxes are found, it returns None (since 3.2b4/1.0)
Properties
- alternateName (r/o) : place name with hierarchy reversed to make country first
- class (r/o) : equal to "PlaceRecord"
- name : place name in standard place hierarchy (town to country)
- recordType (r/o) : equal to "_PLC"
Supported Object Commands
(return to Object Index)
Source Record
A GEDCOM Record documenting a source used in genealogy researching (good genealogy files best documented with all their sources). The record type is SOUR and class type is SOURRecord.
Inheritance
To-many object lists
- referencedBy : a list of record IDs that reference this source record.
To single objects
Properties
- class (r/o) : equal to "SourceRecord"
- recordType (r/o) : equal to "SOUR"
- sourceAuthors : Author(s) of the source
- sourceDate : Publication date for a source
- sourceDetails : Source details such as publisher, journal, magazine, comments, etc.
- sourceTitle : Title of the source
- sourceType : Type of source (book, article, web page, in book, unpublished, or general)
- sourceURL : URL of a web page source
Supported Object Commands
(return to Object Index)
Note Record
A GEDCOM Record for adding notes abot a record or almost any structure within a record. Notes are a good way to add information that does not fit in other places. The record type is NOTE and class type is NOTERecord.
Inheritance
To-many object lists
- referencedBy : a list of record IDs that reference this source record.
To single objects
Properties
- class (r/o) : equal to "PlaceRecord"
- name (r/o) : Name of the note record is the first line of the notes text or a designated name (if found), but it is read only.
- notesText : Text of the notes in this record
- recordType (r/o) : equal to "_PLC"
Supported Object Commands
(return to Object Index)
Repository Record
A GEDCOM Record documenting places where sources are stored (such as a library). The record type is REPO and class type is REPORecord.
Inheritance
To-many object lists
To single objects
Properties
- class (r/o) : equal to "REPORecord"
- recordType (r/o) : equal to "REPO"
Supported Object Commands
(return to Object Index)
Multimedia Record
A GEDCOM Record with a link to and inforation about a multimedia object or a web site. The record type is OBJE and class type is OBJERecord.
Inheritance
To-many object lists
- referencedBy : a list of record IDs that reference this source record.
To single objects
Properties
- class (r/o) : equal to "OBJERecord"
- objectDate : The recorded date (GEDCOM style) for the multimedia object
- objectDateUser (r/o) : The recorded date (user-preferred style) for the multimedia object
- objectForm : The format for the multimedia object (if known)
- objectPath (r/o) : Full POSIX path (with /'s) to file for multimedia object or URL for web site. If a file and it is not found, returns empty string.
- objectPlace : The recorded place for the multimedia object
- objectSDN (r/o) : Minimum recorded date as serial day number (0 if no date or invalid date)
- objectSDNMax (r/o) : Maximum recorded date as serial day number (0 if no date or invalid date
- recordType (r/o) : equal to "OBJE"
Supported Object Commands
(return to Object Index)
Report Record
A custom GEDCOM Record in GEDitCOM II to display genealogy reports. The record type is _RPT and class type is ReportRecord.
Inheritance
To-many object lists
To single objects
Properties
- body : The text body of the report
- class (r/o) : equal to "ReportRecord"
- recordType (r/o) : equal to "_RPT"
Supported Object Commands
(return to Object Index)
Research Log Record
A custom GEDCOM Record in GEDitCOM II to enter notes for planned genealogy research tasks. The record type is _LOG and class type is LOGRecord.
Inheritance
To-many object lists
- referencedBy : a list of record IDs that reference this source record.
To single objects
Properties
- class (r/o) : equal to "LOGRecord"
- recordType (r/o) : equal to "_LOG"
Supported Object Commands
(return to Object Index)
Book Style Record
A custom GEDCOM Record in GEDitCOM II to store settings for create books using the the "Create Generations Book" extension. The record type is _BOK and class type is BookRecord.
Inheritance
To-many object lists
To single objects
Properties
- authorEmail : The author's email address
- authorName : The author's name to appear in the book
- class (r/o) : equal to "BookRecord"
- recordType (r/o) : equal to "_BOK"
- saveFolder : Full path to folder for saving the output files for the book
Supported Object Commands
(return to Object Index)
Header Record
A GEDCOM Record with information about the data in the genealogy file. The record type is HEAD and class type is HEADRecord. Only one header record can be in a file.
Inheritance
To-many object lists
To single objects
Properties
- class (r/o) : equal to "HEADRecord"
- language : The preferred language for the data in this file
- name (r/o) : The name of the header record is always "Header Record" (and it is read only)
- placeHierarchy : The default place hierarchy (e.g., "city, county, state, country") (since 1.5/1.0)
- recordType (r/o) : equal to "HEAD"
Supported Object Commands
(return to Object Index)
Submitter Record
A GEDCOM Record with information about people researching the genealogy data in the file. The record type is SUBM and class type is SUBMRecord.
Inheritance
To-many object lists
To single objects
Properties
- class (r/o) : equal to "SUBMRecord"
- recordType (r/o) : equal to "SUBM"
Supported Object Commands
(return to Object Index)
Submission Record
A GEDCOM Record with information about submitted this GEDCOM data (rarely used and will be removed in future version of the GEDCOM standard). The record type is SUBN and class type is SUBNRecord. Only one submission record can be in a file.
Inheritance
To-many object lists
To single objects
Properties
- class (r/o) : equal to "SUBNRecord"
- name (r/o) : equal to "Submission Record"
- recordType (r/o) : equal to "SUBN"
Supported Object Commands
(return to Object Index)
Custom Record
This class is used for any GEDCOM Record in a file that does not correspond to standard GEDCOM records or to any custom records defined by GEDitCOM II. The record type is whatever code you use when creating the record (the GEDCOM standard stipulates that custom record types should being with an underscore character) and class type is OtherRecord.
Inheritance
To-many object lists
To single objects
Properties
- class (r/o) : equal to "OtherRecord"
- recordType (r/o) : equal to whatever was used when the record was created. To follow the GEDCOM standard, custom record types should being with an underscore ("_").
Supported Object Commands
(return to Object Index)
Album of Records
This class corresponds a user- or script-defined album of records that appears in the main index window for any document.
Inheritance
To-many object lists
To single objects
Properties
- class (r/o) : equal to "album"
- count (r/o) : the number of GEDCOM Recordsin the album
- id (r/o) : a unique ID among all albums in the document
- name : the albums's name
Supported Object Commands
(return to Object Index)
GC List
A "GC List" is a fixed list, which means internal scripts have limited options for working with the "GC Lists". In most cases such lists are the actual lists being used internally by GEDitCOM II (e.g., a list of individuals in a document). They are provided as "GC lists" for speed (no need to make copies of long lists) and to keep information in the script in synch with information in GEDitCOM II. (e.g. if the user or the script adds, deletes, or rearranges individuals in a "GC List" from a document, such changes will be made to the "GC List" object in the script as well).
Inheritance
To-many object lists
To single objects
Properties
- class (r/o) : equal to "GC list"
- contains.objName (r/o) : "true" or "false" if the object in
objName is in the list. The objName can be entered by its name or with its name in a variable (e.g., @contains.#var) (since 3.1/1.0)
- count (r/o) : the number of elements in the list. When using object specifiers or a get command, lists are numbered starting from zero and the last element is at index
count-1.
Supported Object Commands
(return to Object Index)
List
This class lets a script create a list that can contain objects or strings (see CreateList command). Various commands are available to work with the list members. Also, all "to-many" object attributes of other classes return either a GC List (when possible) or this type of list if the returned list does not correspond to an internal list within GEDitCOM II.
Inheritance
To-many object lists
To single objects
Properties
- class (r/o) : equal to "list"
- contains.stringOrObjName (r/o) : "true" or "false" if the string is in a list of strings or if object in
objName is in the list. A string can be entered as the string, a quoted string, or a variable name (and the variable value is used). If the string has spaces, use quotes or a variable. An objName can be entered by its name or with its name in a variable (e.g., @contains.#var) (since 3.1/1.0).
- count (r/o) : number of elements in the list. When using When using object specifiers or a get command, lists are numbered starting from zero and the last element is at index
count-1.
Supported Object Commands
(return to Object Index)
Dictionary
This class lets a script create a dictionary that contains key-value pairs (see CreateDictionary command). Various commands are available to work with the keys and values.
Inheritance
To-many object lists
- allKeys : A list of all keys in the dictionary (in no particular order; to order them, see next two relations).
- keysSortedByNumericValues : A list of all keys in order determined by sorting all values by their numeric values. Values that are not numbers are sorted to the end in random order.
- keysSortedByStringValues : A list of all keys in order determined by sorting all values by their string values. Values that are empty strings are sorted to the end in random order.
- allValues : A list of all values in the dictionary.
To single objects
Properties
- class (r/o) : equal to "dictionary"
- count (r/o) : number of key-value pairs in the dictionary.
- (key) : a string or number value corresponding to the key (the key cannot be any of the above properties). If the key does not exist or is an object instead of a string or number, accessing this property will cause an error (use valueForKey command instead if you need to trap such errors). You can set value for the key, but can only set as a string value (since 3.2b6/1.0)
Supported Object Commands
(return to Object Index)
ScriptOutput
Scripts that are creating reports typically create one "ScriptOutput" object (see CreateScriptOutput command) to help build the report and then finally display it in a report record window. See the help section on Writing Customizable Reports for more details on using this object for creating reports.
Inheritance
To-many object lists
To single objects
Properties
This class has many properties to control the created report. Although you can read and set all properties for any report style, the ones that matter depend on report style. For html, the only relevant properties ares:
- class (r/o) : equal to "ScriptOutput"
- length : reports are assembled as items in a list and each out command adds an new item to that internal list. This attribute returns the current number of items in that list (since 3.3/1.0).
Plain text reports can use the above properties and the following additional properties:
- monoCol (r/o) : the column number for the current line of the report.
- monoFont : the font name for the report. Any font name can be used, but monospaced fonts work best when aligning text into column blocks (default: Courier).
- monoSize : the font size used to display the report in the report window (default: 12)
- printSize : the font size used when printing the results (default: 9)
Monospace, can use all above properties and the following additional properties:
- bottomMargin : number of blanks lines inserted between the footer text (or page text if footerText is not set) and the bottom of the page (default: 0).
- centering : set to 1 to center text in spaces defined by rpt.out command providing the specified column number is greater than 0 (default: 0 or not centered).
- colsPerRow : number of characters allowed in each line of output (default: 88)
- footerAlign : set to -1, 0, or 1 to have footer left justified, centered, or right justified on each page (default: 0 or centered)
- footerText : a single line of text to use for a footer on each page; if "[#]" is included in the text, it will be replaced with the current page number (default: no footer). Note that footer text is not output for page numbers less than 1.
- headerAlign : set to -1, 0, or 1 to have header left justified, centered, or right justified on each page (default: 0 or centered)
- headerText : a single line of text to use for a header on each page; if "[#]" is included in the text, it will be replaced with the current page number (default: no header). Note that header text is not output for page numbers less than 1.
- monoPage : the current report page number (default: 1 to start the report with page 1)
- monoRow (r/o) : the current row number for the report
- rowsPerPage : number of report rows to use on each page including rows used by headers and footers (default: 72). Note that when a header is used, it will occupy
topMargin+1+textGap lines; a footer will occupy the last bottomMargin+1+textGap lines.
- textGap : number of blank lines to insert between body of the report and headers or footers, but only inserted if headers or footers are set (default: 1)
- topMargin : number of blanks lines inserted between top of the page and the header text, but only inserted if headerText is set (default: 0).
Supported Object Commands
(return to Object Index)
Window
This object is for all windows opened in the Genealogy application.
Inheritance
To-many object lists
To single objects
- document : the Genealogy Document associated with the window or None if not tied to a document (since 3.0b3/1.0).
- bounds (sets) : a list with four numbers for the window's origin x, origin y, width, and height in window coordinates (since 3.0b3/1.0).
Properties
- class (r/o) : equal to "window"
- id (r/o) : a string unique to this window (since 3.0b3/1.0)
- name : the name in the window's title bar (since 3.0b3/1.0)
Supported Object Commands
(return to Object Index)
None
This object is returned by any "To-One" object attribute that does not have that connection. If objName in a "None" type object, the conditional ifDef objName is false and the conditional ifNDef objName is true. Alternatively, you can check for "None" type object by seeing if @objName.class is equal to "none".
Inheritance
To-many object lists
- Returns a "None" object always
To single objects
- Returns a "None" object always
Properties
- class : equal to "none"
- (anything else) : returns empty string ""
Supported Object Commands
(return to Object Index)