The AddIniAny method is used to write, change and read integer variable from the ini-file. Unlike the AddIni method, in AddIniAny method you can specify the section of the file that contains the integer variable. The method returns the value of the variable after its changing.
Method call syntax:
function AddIniAny(varName: String, varValue: int, path: String, section: String): int |
Example. There is no "MyVar" variable in the "config" section of the "C:\\test.ini" file. Write such variable with the -1 value to the file, then add 1 to it and display the result value on the script debug window.
var result = AddIniAny("MyVar", -1, "C:\\test.ini", "config"); result = AddIniAny("MyVar", 1, "C:\\test.ini", "config"); DebugLogString(result); |