0 Replies Latest reply on Feb 5, 2008 2:18 PM by Neatgadgets

    Read/Write INI Files

    Neatgadgets
      I am trying to find out how to read/write ini files. The only info I have found so far is with the use of fscommand which doesn't seem to work. Can someone point me to some useful reading material?

      example below that is not working:

      function writeValue(resultvar, file, section, variable, value)
      {
      fscommand("Arg", resultvar);
      fscommand("Arg", file);
      fscommand("Arg", section);
      fscommand("Arg", variable);
      fscommand("Arg", value);
      fscommand("INIFile.SetVal", "");
      }

      var resultvar = "_level0.rc";
      var file = "c:\\alert.ini";
      var section = "section1";

      writeValue(resultvar, file, section, "road1", "1");
      writeValue(resultvar, file, section, "road2", "0");
      writeValue(resultvar, file, section, "road3", "0");

      Thanks

      Andrew