Documentation for Intellect 4.11.0-4.11.3. Documentation for other versions of Intellect is available too.

Previous page Next page


You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

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

Method call syntax:

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

Method arguments:

  1. varName — required argument. Sets the name of the variable for saving in the file.
  2. varValue — required argument. Sets the value of a variable.
  3. path — required argument. Sets the full path to the ini-file where the variable should be stored. The storage of variables can be placed on a network resource; for this, specify the network path in this argument.
  4. section — required argument. Sets the name of the section of the ini-file where the variable should be stored.

Example. Write the MyVar variable to the "config" section of the C:\\Backup\\test2.ini file, and specify 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