Ok so I have a crude little frame with all my buttons on it and I have created a set of hidden buttons on the UI with my macrotext targetting code for each permutation of Nazgrim's adds. I can just type /click myButton and it's all good but I've set the frame buttons to use those buttons and nothing seems to happen :/ Any ideas? I'll give an example.
Lua Code:
local targetSAButton = CreateFrame("Button", "targetSA", UIParent, "SecureActionButtonTemplate")
targetSAButton:Hide()
targetSAButton:SetAttribute("type", "macro")
targetSAButton:SetAttribute("macrotext", [[
/cleartarget
/tar [@Kor'kron Assassin, nodead] Kor'kron Assassin
/script SetRaidTarget('target', 7)
/cleartarget
/tar [@Kor'kron Warshaman, nodead] Kor'kron Warshaman
/script SetRaidTarget('target', 8)
/rw Warshaman + Assassin]])
local saButton = CreateFrame("button", "NazAddsFrameSAButton", NazAddsFrame, "UIPanelButtonTemplate")
saButton:SetHeight(20)
saButton:SetWidth(40)
saButton:SetPoint("TOPLEFT", NazAddsFrame, "TOPLEFT", 12, -12)
saButton:SetText("S+A")
saButton:SetAttribute("type", "macro")
saButton:SetAttribute("macrotext", "/click targetSA")
I hope you're all having a more exciting Saturday night that I am