If you're using DoString you can call this LUA function:
Code:
slots = GetContainerNumSlots(bagId);
where bagId is a number 1..5
if slots == 0 then you haven't got a bag equipped in that bag-slot.
And then you can run through your bags slot by slot and find out what's in each. It will give you even bags that aren't equipped but just sitting in your equipped ones:
Code:
for bag = 0,4 do
for slot = 1,GetContainerNumSlots(bag) do
item = GetContainerItemLink(bag,slot)
-- do whatever you want with the item
end
end
If you're using DoString along with GetLocalizedText you can probably grab information from that LUA script, even though I am not sure myself.