MyChat Scripts Engine: RegGetString
Reading a text string from the registry.
Syntax
function RegGetString(iRootKey: cardinal; sName: string; var sValue: string): boolean;
Parameters and return values
Parameter |
Type |
Value |
iRootKey |
cardinal |
registry root. List of available keys; |
sName |
string |
branch, registry key, where the text string is located; |
sValue |
string |
return value of the key. If there is no key, the function returns an empty string. |
Function result
Boolean value. True, if the function completed successfully; False, if the error occurs.
Example
var
sData: string;
begin
if RegGetString(HKEY_CURRENT_USER, 'Control Panel\Mouse\MouseSensitivity', sData) then mLogScript(sData, '')
else mLogScript('Error loading MouseSensitivity data from registry!', '');
end.
Script work result
[19:21:59] (Log "RegGetString"): 10