GetRegions just returns all non-Frame objects (FontStrings and Textures) that are a child of the frame. Just iterate through the returned objects to find yours.
Code:
for _, obj in pairs{frame:GetRegions()} do
-- You have to use your own heuristic to find the frame. For example if you know that the
-- texture file is the default status bar texture, you could use this to find it:
if obj:GetObjectType() == 'Texture' and obj:GetTexture() == 'Interface\\TargetingFrame\\UI-StatusBar' then
-- This is the frame we want, manipulate it here.
end
end
You should also be able to do this instead of using a throw-away table:
Code:
for i = 1, select('#', frame:GetRegions()) do
local obj = select(i, frame:GetRegions())
-- Same code as above
end
But if this is only something your doing once then I don't think it matters which way you choose.