CRegistry:GetRgb
The GetRgb method returns an RGB value string form a registry key. The return value is in a form like "100,240,255" which contains R, G, and B color values between 0 and 255. The method also specifies a default value to be returned if the named value or key does not already exist in the Registry. You can work with the RGB string value using the CColorRef class.
| 
 rgbValue = CRegistry:GetRgb( sName, rgbDefault ) 
 
 
  | 
The following script opens a key specified by sKeyName and returns an RGB string value saved under the name "MyVal":
| 
 | 
 -- open the key and create a CRegistry object  | 
| 
 | 
 -- fetch the value of "MyVal", default to "255,0,0"  | 
| 
 | 
 -- Result: MyVal= 255,0,0 (value did not already exist)  | 
CRegistry class, SetRgb, CColorRef
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.