.. highlightlang:: us .. _writeprofilestring: WriteProfileString ================== .. index:: WriteProfileString .. us.tag WriteProfileString NOTREADYENGLISH uniplot-registry Changed5101 :ref:`WriteProfileString` writes a string into the specified section of an initialization file or the Windows registry database. .. function:: bool = WriteProfileString(ssSection, ssKey, ssString) bool = WriteProfileString(ssSection, ssKey, ssString, ssFileName) .. us.return **Return Value** *bool* The return value is TRUE (1) if the function is successful, otherwise, it is FALSE (0). .. us.params **Parameters** .. uparam:: ssSection *ssSection* is a scalar string that specifies the section to which the string is to be copied. If the section does not exist, it is created. The name of the section is case-independent. .. uparam:: ssKey *ssKey* is a scalar string containing the entry to be associated with the string. If the entry does not exist in the specified section, it is created. If this parameter is an empty string, the entire section, including all entries within the section, is deleted. .. uparam:: ssString *ssString* is a scalar string to be written to the specified file. The string length is limited to 16384 characters. .. uparam:: ssFileName *ssFileName* is a string that names the initialization file. If the file does not exists, it will be created. If *ssFileName* is not specified the data is saved in the Windows registry in the key :file:`HKEY_CURRENT_USER\\Software\\RSB\\UniPlot5`. .. us.example **Example** :: WriteProfileString("Section", "Key", "Test", "d:/test.ini") :: [Section] Key=Test .. us.history **History** .. us.comment **Comment** If the INI-file is a UNICODE file with a BOM, the strings are saved as UNICODE strings, otherwise strings are saved as ANSI text. By default UniPlot creates ANSI files. An ANSI file can be converted to a UNICODE file using notepad.exe. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.10.1 - If the parameter *ssString* contains characters with a code smaller than 0x20 (blank) for exampel a newline character the string is written as an escape sequence. In this case the string starts with "esc:". .. seealso:: :ref:`overview-files`, :ref:`GetProfileString`, :ref:`WriteProfileInt` :sub:`id-1988435`