View Single Post
07-07-18, 05:28 PM   #1
robertito54321
A Murloc Raider
Join Date: Aug 2012
Posts: 8
Secure actionbutton macro with binding

How can I set a binding to a button through secure code that will only trigger on itself?

I have it kinda working with 'SetBindingClick' but it also triggers outside of the button...
I basically want the button to execute the macro when I hover over it and press 'NUMPAD2'

Example secure snippet
Code:
self:SetAttribute("type", "macro")
self:SetAttribute("macrotext", [[/cast [@player] Effuse]])

--self:SetBindingClick(false, "NUMPAD2", self, self:GetName()) --works, but also works outside the btn :/
--self:SetBinding(false, "NUMPAD2", "MACRO mymacro") --doesnt work
--self:SetBindingMacro(false, "NUMPAD2", "mymacro")  --doesnt work
  Reply With Quote