MyChat Scripts Engine: RegGetInt
Reading an integer from the registry.
Syntax
function RegGetInt(iRootKey: cardinal; sName: string; var iValue: cardinal): boolean;
Parameters and return values
Parameter |
Type |
Value |
iRootKey |
cardinal |
registry root. List of available keys; |
sName |
string |
branch, registry key, where the number is located; |
iValue |
cardinal |
return value of the key. If there is no key, the function returns 0. |
Function result
Boolean value. True, if the function completed successfully; False, if the error occurs.
Example
var
iData: cardinal;
begin
if RegGetInt(HKEY_CURRENT_USER, 'Control Panel\Desktop\LastUpdated', iData) then mLogScript(inttostr(iData), 'LastUpdated')
else mLogScript('Error loading LastUpdated data from registry!', '');
end.
Script work result
[19:33:45] (Log "RegGetInt"): [LastUpdated] 4294967295