This is a Firebot Startup Script that adds the ability to read from and write to INI files.
- In Firebot, go to Settings > Scripts
- Enable Custom Scripts if they are not currently enabled
- Click Manage Startup Scripts
- Click Add New Script
- Click the "scripts folder" link to open the Scripts Folder and place
oceanityIni.jsthere - Refresh the list of scripts and pick
oceanityIni.jsfrom the dropdown
- Overwrite existing
oceanityIni.jswith new version - Restart Firebot
This script adds the following features to Firebot
-
Effects
- Write to INI File
- Adds or removes a value from either the built-in INI file the script creates (
firebot.iniin the data folder) or a specified INI file
- Adds or removes a value from either the built-in INI file the script creates (
- Write to INI File
-
Variables
- $ini[
path?,section,key]- Retrieves a value with the provided section and key from the provided INI file, or default if no path is provided
- eg.
$ini[mySection, myKey]will retrieve the value in [mySection] myKey fromfirebot.ini - eg.
$ini[C:/Users/Firebot/Documents/MyINI.ini, mySection, myKey]will retrieve the value in [mySection] myKey from an INI file located at that path
- $ini[