Hi,
I am currently having trouble with GetBindingKey() when trying to fetch the keybinds of the Multi Action Bars. Below is a sample code of my current AddOn.
Code:
local dashingDismount = CreateFrame("Frame")
function dashingBindings()
local buttonName
local actionType, id, _, actionName
local key1, key2
local ActionBars = {"Action","MultiBarBottomLeft","MultiBarBottomRight","MultiBarLeft","MultiBarRight"}
for bar = 1, #ActionBars do
for i = 1, 12 do
buttonName = ActionBars[bar] .. "Button" .. i
actionType, id, _ = GetActionInfo(_G[buttonName].action)
actionName = GetSpellInfo(id)
print(buttonName)
key1, key2 = GetBindingKey(buttonName)
if key1 ~= nil then
print(key1)
end
if key2 ~= nil then
print(key2)
end
end
end
end
local function dashingInit(self, event, ...)
dashingBindings()
end
dashingDismount:RegisterEvent("PLAYER_LOGIN")
dashingDismount:SetScript("OnEvent", dashingInit)
The code only manages to print(key1) for ActionButton1 to ActionButton12. MultiBarBottomLeftButton1 and beyond do not get to the print() at all. Am I missing something obvious?