Back to Script Function Reference
The Set_CFG_Value() function can be used for manipulating configuration files by setting key=value pairs. If you need more control over what is written to the configuration file, see Set_CFG_Item(). If you need to set values in a standard Windows INI file ([sections] containing key=value pairs), see Set_INI_Value().
Set_CFG_Value(filenum/filename||key||value)
Argument | Required | Description |
---|---|---|
filenum/filename | Yes | The number of the file set in the script's associated files list that you want write to, or the absolute path\filename you want to write to. If you are using an absolute path\filename, any script environment variables found in filename will be replaced by their actual values when the script is executed. |
key | Yes | The key within the configuration file that you want to set. Any script environment variables found in key will be replaced by their actual values when the script is executed. |
value | No | The desired value pertaining to key that you want to set. Any script environment variables found in value will be replaced by their actual values when the script is executed. |
Set_CFG_Value(%emupath%\config.cfg||$LOADPATH||%gamepath%)
The line in the config file would look something like this: -
$LOADPATH=c:\games
Set_CFG_Value(4||MODE||Windowed)
The line in the config file would look something like this: -
MODE=Windowed
Set_CFG_Value(4||MODE||)
The line in the config file would look something like this: -
Mode=