ssCore.INIFile.setVal

Writes a value into the specified section and key of the INI file.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

path - A fully qualified path to the INI file. This parameter supports monikers.

section - The name of the section containing the key to be updated.

key - Name of the key to be updated.

value - String that will be written to the specified section and key of the INI file.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.INIFile.setVal( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.INIFile.setVal( paramsObject );


Notes:

If the INI file does not exist it will be created automatically but directories will not be created automatically. If you use a directory that does not exist as part of the path, the INI file creation will fail.

If the section does not exist it will be created automatically.

The values you write can't contain carriage returns (ASCII 13) or linefeeds (ASCII 10) and on Windows 95 you can't include a tab (ASCII 9) in the value. You can get around these INI file limitations by encoding the strings you write and decoding them when you read them back. See the Flash documentation for escape() and unescape().

Do not include the enclosing square brackets ("[" and "]") in the section name argument.

                

Examples:

ssCore.INIFile.setVal({path:"startdir://settings.ini", section:"Window", key:"width", value:"554"});