Hey guys so this codes been around a while found on
https://us.forums.blizzard.com/en/wo...cript/262608/7
I'm trying to get it to work on Dragonflight 100002. So far the following code works only when you mouseover the action buttons individually. I'm not sure how to write something to just make it fire on all action buttons like it used to. Please help
Lua Code:
local function updatehotkey(self, actionButtonType)
local hotkey = _G[self:GetName() .. 'HotKey']
local text = hotkey:GetText()
text = string.gsub(text, '(s%-)', 'S')
text = string.gsub(text, '(a%-)', 'A')
text = string.gsub(text, '(c%-)', 'C')
text = string.gsub(text, '(Mouse Button )', 'M')
text = string.gsub(text, '(Middle Mouse)', 'M3')
text = string.gsub(text, '(Num Pad )', 'N')
text = string.gsub(text, '(Page Up)', 'PU')
text = string.gsub(text, '(Page Down)', 'PD')
text = string.gsub(text, '(Spacebar)', 'SpB')
text = string.gsub(text, '(Insert)', 'Ins')
text = string.gsub(text, '(Home)', 'Hm')
text = string.gsub(text, '(Y)', '1')
text = string.gsub(text, '(U)', '2')
text = string.gsub(text, '(I)', '3')
text = string.gsub(text, '(O)', '4')
text = string.gsub(text, '(P)', '5')
text = string.gsub(text, '(H)', '6')
text = string.gsub(text, '(J)', '7')
text = string.gsub(text, '(K)', '8')
text = string.gsub(text, '(L)', '9')
--text = string.gsub(text, '(B)', '10')
text = string.gsub(text, '(N)', '11')
text = string.gsub(text, '(M)', 'M')
hotkey:SetText(text)
end
hooksecurefunc("SetActionUIButton", updatehotkey)
--ActionBarActionButtonMixin:OnEvent(updatehotkey, "UPDATE_BINDINGS")
Ok so this code correctly changes the hotkey but only when you mouse over the action buttons individually. I'm not sure how to have the SetText fire all at once on every button.
I should add I have commented out the OnEvent at the bottom because it doesn't work. I think that's the part I need to figure out to make this work again.