CRegistry:GetBool CRegistry:GetNum

CRegistry:GetInt


The GetInt method returns an integer number value from a registry key. The method also specifies a default value to be returned if the named value or key does not already exist in the Registry.

Syntax

nValue = CRegistry:GetInt( sName, nDefault )

bullet.gif    nValue is an integer number value.

bullet.gif    sName is the keyword (name) of the value to fetch.

bullet.gif    nDefault is the default integer value returned if sName is not found in the Registry.

Example

The following script opens a key specified by sKeyName and returns an integer value saved under the name "MyVal":

R = CRegistry:Open( sKeyName )

-- open the key and create a CRegistry object

v = R:GetInt( "MyVal", 108 )

-- fetch the value of "MyVal", default to 108

Printf( "MyVal= %d", v )

-- Result: MyVal= 412 (value already existed)

Related Topics

CRegistry class

SetInt

 


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.