Forum Discussion

ibscas's avatar
ibscas
Visitor
14 years ago

Looping Through Registry Section?

I've been combing the docs and here but cannot find an answer to this. I've created a section in the registry called "configs" and each config I write as "config1",configdata. I'm trying to figure out how I can loop through ALL entries in the "configs" section and identify "config1", "config2", etc. Right now I have to know the name and poll it specifically, which means I'll have to create another reg entry for an index and hate to do that on the precious 16K that is allotted for channels.

I tried the following quick test to no avail:


sec = CreateObject("roRegistrySection", "configs")
print "Reg: " + sec
for each z in sec
print sec.read(z)
next

2 Replies

  • I haven't tested this out, but something like this should work:


    for each key in sec.GetKeyList ()
    print "Key=" + key + ". Value=" + sec.Read (key)
    end for
  • You are awesome, that was just what I needed. Thank you so much!