Our first step of the new Authors Portal is Live! Learn more or click here to check it out!
local button = CreateFrame("Button", "TargetByNameButton", UIParent, "SecureActionButtonTemplate")
TargetByNameButtonIcon:SetTexture("<some texture path>")
button:SetAttribute("macrotext", "/targetexact <player name>")
Quote from TekkubPerhaps it'd be simpler to just paste "/target name" into the editbox for the user, and let them hit return? Secure buttons in config is just asking for trouble if you ask me.
Quote from sylvanaarThat doesn't work by the way. The text is tainted.
Quote from SlakahWorks fine for me.
Quote from xbeepsIn or out of combat?