Main Help → GENerel Commmands → Sepcial Variables
There are several system variables you can read and write in templates to control features of cell creation. A browser style can also create it's own special variables (using a browser style's editing properties) that will be initialized to a default setting and templates can use them for any custom purpose. There are also numerous read-only variables that provide information about the cell creation process.
Note: When using GENerel to write internal scripts, there are no "System Variables" and only the "Read-Only Variables" listed here.
The following variables are initialized to their current values at the start of any template (see editing properties). A template can change their value to change that property for subsequent cells and called templates. They are reset to the original values when the template ends.
#cellSkip - the spacing between cells in a row.
#lineSkip - the spacing between rows of cells.
#leftSkip - the left margin or distance from left window edge to start of the first cell.
#rightSkip - the right margin or distance edge of last cell to right edge of the window.
The following variables can be used in expressions, but cannot be changed by a template (although some can be changed with commands). They all end in "$". The variables (in alphabetical order) are:
#appName$ - it will be "GEDitCOM II" or "GEDitCOM" depending on which application the current user is running.#bottomMargin$ - the distance from the bottom of the last cell to the bottom of the scrolling area for the window.
#cellHeight$ - the height of the current cell (or -1 if not in a cell)
#cellSkip$ - the default value for the #cellSkip variable. It can be used to reset #cellSkip if it is changed in a template.
#cellWidth$ - the width of the current cell (or -1 if not in a cell).
#defaultHeight$ - the default height for cells (when the height is not explicitly set).
#defaultWidth$ - the default width for cells (when the width is not explicitly set).#displayHeight$ - the total height of the view area in the current window being formatted for display.#habs$ - the current horizontal position from left edge of the window for cell creation.
#hpos$ - same as #habs$ except when in a GroupBox cell, it is the distance from left edge of the group box.objectImage, objectFull, or imageFile properties). The options are:
e.g., a text file, movie file, sound file, etc.). The cell will display an icon for the file or a generic QuickTime icon if no icon can be determined.i.e., one set using the cell's image property).#imageHeight$ - the height of the image in the current cell (or -1 if there is no image).
#imageWidth$ - the width of the image in the current cell (or -1 if there is no image).
#imagePPI$ - the pixels per inch resolution of the image in the current cell (or -1 if there is no image). Note: if you set imageWidth or imageHeight for a cell, the image is redrawn causing #imagePPI$ to be 72. If you need to know resolution of the source image, check #imagePPI$ before changing image dimensions.
#leftSkip$ - the default value for the #leftSkip variable. It can be used to reset #leftSkip if it is changed in a template.
#lineSkip$ - the default value for the #lineSkip variable. It can be used to reset #lineSkip if it is changed in a template.#macOS$ - returns MacOS version as 1040 for Tiger, 1050 for Leopard, and 1060 for Snow Leopard or newer. Occasionally you need to know the MacOS to format the display correctly.#mmPath$ - full path to multimedia file associated with the current cell (or "" if no file is linked, e.g., if a file was not found).#paperHeight$ - the height of the printable area (in pixels) for a page in the currently selected printer using the current page setup properties.#paperWidth$ - the width of the printable area (in pixels) for a page in the currently selected printer using the current page setup properties.#parentTag$ - parent tag for the current template. If in a structure window, may be pseudo tag for the grouped record (template name). If in a section of a multipane display, it will be base tag for the record (e.g., INDI). #printLeft$ - left margin for current print settings for printing browser window content.#printTop$ - top margin for current print settings for printing browser window content.#printRight$ - right margin for current print settings for printing browser window content.#printBottom$ - bottom margin for current print settings for printing browser window content.#returnValue$ - the most recent result return by a return command in a subroutine or "????" if nothing was returned.
#rightMargin$ - the width of current display area for cells.
#rightSkip$ - the default value for the #rightSkip variable. It can be used to reset #rightSkip if it is changed in a template.
#today$ - today's date formatted using the user-settings for dates.#topMargin$ - the distance from the top of the window to the top of the first cell.
#thumbnailSize$ - the maximum size (in pixels) of thumbnails currently being created by GEDitCOM II for cells using objectImage.#vabs$ - the current vertical position from top edge of the window for cell creation.
#vpos$ - same as #vabs$ except when in a GroupBox cell, it is the distance from top edge of the group box.