Yes - you can have a frame target something - how else would unit/raid frames work! You do it by attaching a macro.

There are a few restrictions though:
- you cannot change the frames visibility in combat
- you cannot move the frame in combat
- you cannot change what the frame targets whilst in combat
- you cannot activate it without a hardware event - no autotargetting

Yes - you can have a frame target something - how else would unit/raid frames work! You do it by attaching a macro.

There are a few restrictions though:
- you cannot change the frames visibility in combat
- you cannot move the frame in combat
- you cannot change what the frame targets whilst in combat
- you cannot activate it without a hardware event - no autotargetting

That's partly true but if you register the events before restrict mode applies you can move or do anything.

How do you use SuperMeter to target players? Clicking on their names doesnt do it, and a quick perusal of the code doesnt show up anything obvious that would do it - in fact, the term 'restricted' doesnt seem to appear in any of SuperMeters code.

You can do pretty much anything with non-restricted frames in or out of combat - but this is about restricted frames - since that's the only way to have a frame target something.

You can build a table based on the information provided by the codes I posted, Group number, player ID, name etc can be stored from here.

Later you can use this information to build text/data for the frames in question, allowing you to change the data in the table the directly effects the frame in or out of combat.

All you need to do is create a base table results of the information your are given, otherwise you can look for it using inspects and insert that data into your table.

You can pre create functions and functions that are triggered by events as the addon loads. Then when triggered it can retrieve desired data about a unit, ability or even just looking for player PvP status.

EG: Setting a frame text from a table:

Code:

function MyAddon:SetName(key) ---Key function global: Is a number for my table
local text = MyAddonTable.MyFrame[key].Name
if text then
MyFrame[key]:SetText("")
MyFrame[key]:SetText(text)
end
end
function MyAddon:SetColour(key) ---Key function global: Is a number for my table
local colour = MyAddonTable.MyFrame[key].Calling
if colour then
if calling == "warrior" then
MyFrame[key]:SetFontColor(0.0, 0.0, 0.0, 0.0)
else calling == "other callings here"
MyFrame[key]:SetFontColor(0.0, 0.0, 0.0, 0.0)
end
end
end
function MyAddon:SetHealth(key) ---Key function global: Is a number for my table
local health = MyAddonTable.MyFrame[key].Health
if health then
MyFrame[key]:SetWidth(---Some Maths here)
end
end

You can build a table based on the information provided by the codes I posted, Group number, player ID, name etc can be stored from here.

Later you can use this information to build text/data for the frames in question, allowing you to change the data in the table the directly effects the frame in or out of combat. Restricted or not.

All you need to do is create a base table results of the information your are given, otherwise you can look for it using inspects and insert that data into your table.

You can pre create functions and functions that are triggered by events as the addon loads. Then when triggered it can retrieve desired data about a unit, ability or even just looking for player PvP status.

EG: Setting a frame text from a table:

MyFrame:SetText(MYADDONTABLE[1].MyFrame.Text)

later I change:

MYADDONTABLE[1].MyFrame.Text = "Hello"

to

MYADDONTABLE[1].MyFrame.Text = "Bye"

I may need to refresh the frame

MyFrame:SetText("")
MyFrame:SetText(MYADDONTABLE.MyFrame.Text)

Yes - but NONE of this has anything to do with the restrictions on a frame in secure mode - which is what the OP was asking about. He wasnt asking about changing the contents of a frame.

He asked :

Possible to click a frame and have it target something? Like you click this and it targets, for example yourself.

And to do this you need to put a macro on the frame. To do this it needs to be in secure mode. If its in secure mode then you cannot change anything about the frame if you are in combat.