This information is for Vicon Shogun 1.7. For up-to-date help, see the latest Shogun documentation.

Vicon Shogun banner


Writes a string value to the user's profile.

Profile values are identified by their section (sections begin with [section name]) and by the entry (or key) name.

Section groupings allow values to be organized in logical groups. They also allow values with the same name to be differentiated between different groups.

Specifying -file allows the values to be written to a file of the user's choice.

The file does not have to have an "ini" extension.

Note that some users use the profile (or other file) as a "global variable" mechanism. While this is still supported, it is not recommended and has been superseded by actual global variables which allow you to have variables that persist between script executions. For more information, see setGlobalVar (and related commands).

Functional area


Command syntax


writeProfileString "sectionHeader" "entry" "value" [-file string]


sectionHeaderstringyesLogical grouping of the value. The section header is the part of the profile which is enclosed in square brackets (e.g. [My Section])
entrystringyesThe entry name. This will be the first value on the line followed by an = sign.
valuestringyesValue to write to the profile.


NameFlag argumentsArgument typeExclusive toComments
file1stringRedirects output to another text file. The default is to output to the user`s profile (.ini file).

Return value


Returns true if the value was successfully written, otherwise false.


// Store some information in the profile
string $value;
// Write to Section 1
writeProfileString "Section1" "Value1" "Hello";
writeProfileString "Section1" "Value2" "World";
// Write to Section 2
writeProfileString "Section2" "Value1" "Scripting";
writeProfileString "Section2" "Value2" "is cool";

/* Will produce output like this
Value2=is cool

// Now retrieve it
$value = `getProfileString "Section1" "Value1" ""`;
print $value;

Additional information

Related commands