Shiny Language Reference

Language Reference > Registry Functions


writeprofileint

bool writeprofileint(string Value, int Data);

 

Synonyms:

bool wpint(string Value, int Data);

 

Writes an int to the registry profile for the plugin

WRITEPROFILEINT stores data in the specified int value in the registry key for this plugin. When a new SSE is loaded by Brass, a registry key is created for it under HKCU\Software\32Bits\Brass\Shiny<plugin_filename>. This key is used to store the position, size and configuration of the display panel as well as associated settings that all plugins have access to (for example, hotkeys). Plugins may read values from and write values to this registry key to manage their configuration and internal settings. The standard registry profile functions are not designed for general-purpose registry access. Instead they are intended to allow plugins to store configuration and ensure that any such configuration stored is unique to the plugin instance. This is why the registry functions do not allow the selection of registry keys. Refer to GETSELFNAME for more information on unique instances.

This statement is only valid in the RegWrite handler

 

Parameters

Value

The name of the registry value to write. Note that registry value names cannot have spaces in them. It is good practice to only use alphanumeric characters.

Data

The data to write to the registry value

 

Return Value

TRUE indicates success, FALSE indicates failure.

 

Example Code

// Store a score in the registry
bool Result = writeprofileint("HiScore", TheHighScore);