Quantcast
Send a slash command to execute another addon (with itemlink) - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-03-21, 01:31 PM   #1
onesock
A Defias Bandit
Join Date: May 2021
Posts: 2
Send a slash command to execute another addon (with itemlink)

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:
  1. local frame = CreateFrame("Button", nil, region, "SecureActionButtonTemplate")
  2. frame:SetAllPoints(region)
  3. frame:SetAttribute("type","macro")
  4. frame:SetAttribute("macrotext", [[
  5. /cast [@player] Arcane Intellect(Rank 5)
  6. ]])
  7. 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!
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Send a slash command to execute another addon (with itemlink)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off