View Single Post
12-12-15, 06:58 PM   #1
saxitoxin
A Theradrim Guardian
 
saxitoxin's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 60
secure actionbutton macrotext and modifiers

How do I add a modifier to a secure actionbutton macrotext?

what I want to do is make my mount macro into a addon, but I cant get the [mod] command to read

mount macro code
Code:
#showtooltip
/cancelform
/leavevehicle
/stopcasting
/cast [mod:shift] Traveler's Tundra Mammoth ; [mod:ctrl] Azure Water Strider ; [mod:alt] Obsidian Nightwing
/run if SecureCmdOptionParse"[nomod]"then C_MountJournal.Summon(0)end
my testcode to see that [mod] is not working

yes, I know that I should post the entire code, but it is such a horrible mess right now so I made this one instead to describe my problem
Lua Code:
  1. local HSframe = CreateFrame("BUTTON","homeButton", UIParent, "SecureActionButtonTemplate")
  2. HSframe:SetPoint("CENTER")
  3. HSframe:SetSize(42, 16)
  4. HSframe:EnableMouse(true)
  5. HSframe:RegisterForClicks("AnyUp")
  6. HSframe:SetAttribute("type1", "macro")
  7. HSframe:SetAttribute("macrotext", "/use [mod] item:128353; item:6948")
  8.  
  9. HSframe.icon = HSframe:CreateTexture(nil,"OVERLAY",nil,7)
  10. HSframe.icon:SetSize(16, 16)
  11. HSframe.icon:SetPoint("LEFT")
  12. HSframe.icon:SetTexture(1,1,0)
  13.  
  14. HSframe.text = HSframe:CreateFontString(nil, "OVERLAY")
  15. HSframe.text:SetFont(STANDARD_TEXT_FONT, 16, "THINOUTLINE")
  16. HSframe.text:SetPoint("RIGHT")
  17. HSframe.text:SetText("HS")
  Reply With Quote