Help - Search - Members - Calendar
Full Version: Registry Script - Request
Intellipool Network Monitor - Forum > Intellipool Network Monitor > Lua scripts
brettzle
Does anyone have a TLUARegistry script that reads a value and that you are will to share?
I just do not have time to learn all the scripting nuances at this time.
RA
A very simple example of reading a value from the registry, in this case a string:

CODE
Reg = TLuaRegistry();
if Reg:Open(Reg.LOCAL_MACHINE,"SOFTWARE\\Intellipool") == true then
    sValue = "";
      bOK,sValue = Reg:ReadValue("test",sValue);
    print(sValue);
end


If you need something more advance, please drop me a mail, we lack a good Registry tutorial like script so I might can find some time for doing that.
brettzle
That works great.

Any chance of being able to read a DWORD value?
RA
Sure smile.gif

CODE
Reg = TLuaRegistry();
if Reg:Open(Reg.LOCAL_MACHINE,"SOFTWARE\\Intellipool") == true then
    iValue = 0;   -- init the value as a number
      bOK,iValue = Reg:ReadValue("number",iValue);
    print(iValue);
end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.