CRegistry:GetBool CRegistry:GetInt

CRegistry:SetBool


The SetBool method saves a Boolean (logical) value to a Registry key. The value being saved must evaluate to true or false.

Syntax

CRegistry:SetBool( sName, bValue )

    sName is the name of the value being saved.

    bValue is the Boolean value to be saved. The argument is evaluated to true or false.

Example

The following script opens a key specified by sKeyName and saves 3 Boolean values to the Registry under the names "MyVal 1":. "MyVal 2", and "MyVal 3".

 

R = CRegistry:Open( sKeyName )

-- open the key and create a CRegistry object

R:SetNum( "MyVal 1", true )

-- saves the value true under the name "MyVal 1"

R:SetNum( "MyVal 2", 25 )

-- saves the value true

R:SetNum( "MyVal 3", a == 4 )

-- saves true only if a equals 4

Related Topics

CRegistry, GetBool