View Single Post
08-01-15, 10:13 AM   #1
Spawnova
A Warpwood Thunder Caller
 
Spawnova's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 96
Can 1 ActionButton have 2 macros attributes?

I have some code to make many actionButton and 1 of the buttons has to have 2 macros, 1 for shift left click and another for right click, but whenever I shift left click, it always executes the macro of right click.

Here is my code:

Lua Code:
  1. if toyList[i].type2 then  --if there is a macro for right click, set it
  2.     btn:SetAttribute("type2", "macro");
  3.     btn:SetAttribute("macrotext", toyList[i].type2);
  4. end
  5. if toyList[i].stype1 then --if there is a macro for shift+left click, set it
  6.     print(toyList[i].stype1)
  7.     btn:SetAttribute("shift-type1", "macro");
  8.     btn:SetAttribute("macro1", toyList[i].stype1);
  9. end
Any help would be great =)

Last edited by Spawnova : 08-01-15 at 10:19 AM.
  Reply With Quote