Assuming you're using the default unit frames:
PartyMemberFrame1
PartyMemberFrame2
PartyMemberFrame3
PartyMemberFrame4
or
Code:
for i=1, 4 do
local frame = _G["PartyMemberFrame"..i]
-- do whatever for the current frame.
end
Typing /fstack and hovering the mouse over a frame will give you what details of the frame are available(/fstack to close again)
You can also extract the code for the
Blizzard UI.