Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

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

Method arguments:

  1. varName

...

  1. is a required argument.

...

  1. It specifies the name of the variable for

...

  1. storing in the file.
  2. varValue

...

  1. is a required argument.

...

  1. It specifies the value of

...

  1. the variable.
  2. path

...

  1. is a required argument.

...

  1. It specifies the full path to the ini

...

  1. file

...

  1. in which the variable

...

  1. must be stored.

...

  1. Storage of variables can be placed on

...

  1. the network resource

...

  1. . To do this,

...

  1. enter the network path in

...

  1. the argument..
  2. section

...

  1. is a required argument.

...

  1. It specifies the name of the section of the ini

...

  1. file in which you want to write the variable

...

  1. .

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.

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

...