Given I have a button in my code with an itemlink available to it, I want to be able to click the button and execute another addon's command that uses the link that would be "shift clicked" from the item via the standard wow UI.
I see how to add macrotext to a button frame like this (may not be 100% correct):
Lua Code:
local frame = CreateFrame("Button", nil, region, "SecureActionButtonTemplate")
frame:SetAllPoints(region)
frame:SetAttribute("type","macro")
frame:SetAttribute("macrotext", [[
/cast [@player] Arcane Intellect(Rank 5)
]])
frame:RegisterForClicks("AnyDown")
I can change the command to do a /command, but I cannot pass an itemlink. Is there something more intuitive/built in command for doing what I'm trying to do?
Thanks!