gemus_script_reference:functions:set_ini_value
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Last revision | |||
— | gemus_script_reference:functions:set_ini_value [2020/05/12 11:28] – created Jimbo | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Back to [[.:|Script Function Reference]] | ||
+ | ====== Set_INI_Value() ====== | ||
+ | |||
+ | The Set_INI_Value() function can be used for manipulating Windows INI files. If you need to set values in // | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | < | ||
+ | |||
+ | ===== Arguments ===== | ||
+ | |||
+ | ^ Argument ^ Required ^ Description ^ | ||
+ | | // | ||
+ | | //section// | Yes | The desired [section] within the INI file where you want to set the value. | ||
+ | | //key// | Yes | The key within the //section// of the configuration file that you want to set. Any [[..: | ||
+ | | //value// | No | The desired value of //key// within //section// of the configuration file. Any [[..: | ||
+ | \\ | ||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | < | ||
+ | Set_INI_Value(%emupath%\config.ini||Config||LoadPath||%gamepath%) | ||
+ | </ | ||
+ | This might have the following effect in the INI file: -\\ | ||
+ | [Config]\\ | ||
+ | LoadPath=c: | ||
+ | |||
+ | < | ||
+ | Set_INI_Value(4||Control||JoystickPort||2) | ||
+ | </ | ||
+ | This might have the following effect in the INI file: -\\ | ||
+ | [Control]\\ | ||
+ | JoystickPort=2 | ||
+ | |||
+ | ===== Remarks ===== | ||
+ | |||
+ | * If the key cannot be found in the configuration file it will be created within the specified section and set to the desired value. | ||
+ | * When the script is executed, a warning message will be displayed if the file cannot be found. | ||
+ | |||
+ | ===== See Also ===== | ||
+ | |||
+ | * [[.: | ||
+ | * [[.: | ||
+ | * [[.:|Script Function Reference]] |
gemus_script_reference/functions/set_ini_value.txt · Last modified: 2023/10/04 14:15 by 127.0.0.1