I remember on my old searching script for Scavenger mod, Munk made me a loop that would get all the datablocks.
function AddToModule(%obj)
{
for(%i=0;%i<DataBlockGroup.getCount();%i++)
{
%obj=DataBlockGroup.getObject(%i);
%file = new fileObject();
%file.openForAppend("./test.cs");
%file.writeLine(%obj);
echo("Weapon datablocks added to ./test.cs");
}
}
Anyway, to make it add to the list, I think you can just do
function AddToModule(%obj)
{
for(%i=0;%i<DataBlockGroup.getCount();%i++)
{
%obj=DataBlockGroup.getObject(%i);
list.addRow(%obj);
}
}
That should work. I'm not good with GUIs, but this will probably work. Just call the function somewhere in your script.