This code you showed, will work but it will error out if that particular child doesn't have a name
Code:
local children = { UIParent:GetChildren() }
for _, child in ipairs(children) do
print("child: " .. child:GetName());
end
Change it to the following and see what output you get then.
Code:
local children = { UIParent:GetChildren() }
for _, child in ipairs(children) do
local name = child:GetName()
if name then print(name) else print("Not Named") end
end
You could then expand that as a recursive function to repeat the process for every frame... then instead of printing the name out, simply create a table of frames with a name containing the frame handle ... then you can use that table for a search by name tool.
I've not needed to do this myself but theoretically it is sound.