Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page The run_cmd and run_cmd_timeout methods  The ReadIniAny method Next page


The WriteIniAny method is used to write a string variable to an ini file. Unlike the WriteIni method, in the WriteIniAny method you can specify the required file section for writing.

Syntax for method invocation:

function WriteIniAny(varName: String, varValue: String, path: String, section: String)

Method arguments:

  1. varName is a required argument. It specifies the name of the variable for storing in the file.
  2. varValue is a required argument. It specifies the value of the variable.
  3. path is a required argument. It specifies the full path to the ini file in which the variable must be stored. Storage of variables can be placed on the network resource. To do this, enter the network path in the argument..
  4. section is a required argument. It specifies the name of the section of the ini file in which you want to write the variable.

Example. Write the MyVar variable to the "config" section of the C:\\Backup\\test2.ini file, and set the "Hello world!" value to it. Then read the written value and display it in the debug window of the script.

WriteIniAny("MyVar", "Hello world!", "C:\\Backup\\test2.ini", "config");
var result = ReadIniAny("MyVar","C:\\Backup\\test2.ini", "config");
DebugLogString(result);
  • No labels