File manipulation

Edit

Ini Files - General #

With the following commands you can save and load data to .ini files. Unlike with variables and stacks, the data is permanently saved and can be loaded again after you close and reopen LioranBoard.
As of now, LioranBoard can natively read and modify only .ini files in its own folder. There are two possible default locations for the .ini files:

  • \lioranboard\LioranBoard Receiver - this is the primary location
  • C:\Users\USERNAME\AppData\Local\LioranBoard - this is the secondary location. Files are saved here instead if something blocks LioranBoard from saving them in their primary location.

Rules for saving and loading ini files:

  1. Each file needs to have a specific structure for LioranBoard to read it, containing [section] and key=”value”.
    Ini file structure
    Ini file structure
  1. You can only save and load .ini files placed in your Receiver folder or one of its inner folders.
  2. Make sure to use the right command for loading and saving data. There are different commands for strings and different commands for real values (numbers).
  3. Use relative path for loading and reading ini files. I.e. test.ini if you wanna load a file from your Receiver folder or /sound/test.ini if you wanna load one from your Receiver/sound folder.
  4. You do not need to include the extension when loading a file. test is totally acceptable.


Edit

File: Save Value #

Saves a real value (number) to .ini file.

Box Name Type Description
File Name String Name of the file. Will create one if it doesn’t exist. Do not include the path.
Section String The section to save the key under.
Key String Name of the value to be saved.
Variable String Variable to be saved as the key value.


Edit

File: Save String #

Saves a string (text) to .ini file.

Box Name Type Description
File Name String Name of the file. Will create one if it doesn’t exist. Do not include the path.
Section String The section to save the key under.
Key String Name of the value to be saved.
Variable String Variable to be saved as the key value.


Edit

File: Load Value #

Loads a real value (number) from .ini file. Will return 0 if it doesn’t exist.

Box Name Type Description
File Name String Name of the file to load
Section String The section to load the key
Key String Name of the key to be loaded
Variable String Variable name you want to save the loaded string under


Edit

File: Load String #

Loads a string from .ini file. Will return 0 if it doesn’t exist.

Box Name Type Description
File Name String Name of the file to load
Section String The section to load the key
Key String Name of the key to be loaded
Variable String Variable name you want to save the loaded string under


Edit

File: Delete Key #

Deletes a key within the specified section in a .ini file.

Box Name Type Description
File Name String Name of the file. Will create one if it doesn’t exist. Do not include the path.
Section String The section to find the key.
Key String Key to delete.


Edit

File: Delete Section #

Deletes a whole section of a .ini file, along with all its keys inside of it.

Box Name Type Description
File Name String Name of the file. Will create one if it doesn’t exist. Do not include the path.
Section String The section to delete.


Edit

File: Key Exists #

Check if a key exists within a given section of a .ini file.
Returns 1 if the key exists and 0 if it does not exist.

Box Name Type Description
File Name String Name of the file. Will create one if it doesn’t exist. Do not include the path.
Section String The section to look inside of.
Key String Name of the key you wish to check.
Variable String Variable to save the result in.


Edit

File: Section Exists #

Checks if a section exists within the specified .ini file.
Returns 1 if the section exists and 0 if it does not exist.

Box Name Type Description
File Name String Name of the file. Will create one if it doesn’t exist. Do not include the path.
Section String The section to check.
Variable String Variable to save the result in.


Edit

Copy Local File #

Copies a file from the Receiver folder and pastes it in any of its subfolders.
Will not replace the file if one with the same name is already present.
As of now it’s not possible to copy files from outside of the Receiver folder.

Box Name Type Description
Local File Path Local Path Full path including the file name you wish to copy.
Local Folder Destination Local Path Where you want to copy the file.
You can use sound\ for sound folder and image\ for image folder.