Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6f

Application v 6.4a

  

 

Chapter SixteenApplication (continued)

16.5 INI Settings Functions

16.5.1 Overview

An INI file is a plain text configuration file used to store settings in a structured format. The consists of key-value pairs organized into sections.

The format is a loose standard to store settings. Originally, the term ‘INI’ was short for “initialization file,” as used by Windows to store settings. For the most part, INI files have been phased out in favor of the newer Windows Registry as introduced with Windows NT. However, the simple format certainly has its uses and further, can be used to avoid registry bloat and keep other applications from easily accessing application data.

While INI stands for “initialization file,” reflecting its purpose in initializing software configurations, such data tends to be used throughout the application’s operating session.

Legato provides INI functions as low level tools to access standard INI data. High level functions for Application Preferences are covered in the next section, Application Preferences Functions.

16.5.2 The INI Format

The format is simple text in the form of: 

[section]

entry=value

entry=value

entry=value

Where the section is a group of data which in turn contains one or more entry=value pairs. The entry names must be unique, and the values must be strings. If numeric or binary data is to be stored, it must be first converted into a valid text string and then restored on read.

Each entry is a key-value pair. The value must be plain text and cannot contain returns or other control characters.

The application also uses a number of INI files which can be accessed. Further, a layer of encrypted functions are also provided to store sensitive information. Accessing an INI file is limited by the security rights of the program. Those rights extend to the specified file and its location.

Finally, INI files can be manually opened and edited in Notepad or in the application. Be mindful that opening the file in the application and then attempting to access or write the file will result in an access error since the application will lock the file.

16.5.3 Filename and Location

Data is stored in a text file generally with a .ini file extensions. The default behavior, when the target parameter has been omitted, is to create a name based on the script name plus an .ini extension. The file will be located in the application’s roaming profile area.

For example, if the script name is “Production Interface.ls”, the target will be:

%appdata%/application/Production Interface.ini

Where %appdata% is the user’s roaming profile, normally located in the user data area under “AppData” and application is the vendor application area, for example “Novaworks”. Note that within the user profile the AppData folder is usually hidden.

If the target parameter is supplied, but is an empty string, the application workstation settings file is used for the target. If a filename is provided without a path, the file is referenced from the application data folder (%appdata%). Finally, if a path is provided, it will specify the exact location of the INI target file.

16.5.4 Functions

Page revised 2026-01-05