GetBindingKey() and MultiActionBar buttons

Hi,

I am currently trying to get GetBindingKey to work with the Multi Action Bars, but I have yet to manage. The code below prints the keybinds for the Action Bar, but not the Multi Action Bars. It does run through completely since print(buttonName) prints the Multi Action Bar names as well as the Action Bar.

The problem seems to be the code: key1, key2 = GetBindingKey(buttonName)

Any help would be appreciated.

local dashingTemp = 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

dashingTemp:RegisterEvent("PLAYER_LOGIN")
dashingTemp:SetScript("OnEvent", dashingInit)

In the Bindings.xml all those additional action bars are called:

  • MultiActionBar1
  • MultiActionBar2
  • MultiActionBar3
  • MultiACtionBar4

Maybe you could try using those names.

1 Like

Thank you for the respond.

The GetBindingKey() function is case sensitive, so I tried the one’s you mentioned and their versal counter-parts (found in the bindings-cache.wtf).

The versal counterpart of ActionButton does not work; as such, one would figure that what you wrote should work. But alas, it does not. I am beginning to wonder if there is something that I have to enable in order to read from the Multi Action Bars.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.