ActiveCompanionSet xtras for Macromedia DirectorStoring User's Preferences in System Registry
VbScriptXtra provides free Registry key wrapper that allows handling operations with System Registry. The code below creates a key at the appropriate location in Registry and then puts there a couple of values.
vb = xtra("VbScriptXtra")
-- Create wrapper
key = vb.CreateWrapper( #RegistryKey )
-- Open it
key.Open( "HKEY_CURRENT_USER", "Software\<YourCompanyName>\<YourProjectName>" )
if key.Failed then exit
key["Settings name"] = 123
key["Another name"] = "Some useful info"
Using User's Preferences in System Registry
Later you may read the data stored in Registry:
vb = xtra("VbScriptXtra")
-- Create wrapper
key = vb.CreateWrapper( #RegistryKey )
-- Open it
key.Open( "HKEY_CURRENT_USER", "Software\<YourCompanyName>\<YourProjectName>", #KEY_READ )
if key.Failed then exit
if key["Settings name"] = 123 then
alert key["Settings name"]
end if
member("SomeMember").text = string(key["Another name"])
|