Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-19-19, 05:25 PM   #1
Noresa
A Murloc Raider
Join Date: Oct 2019
Posts: 4
Add a script LUA to Domino Bar Addon Hotkeys [Solved]

Hello Guys,

I've bought a SteelSeries Mice with 15 Buttons and to use all of them I had to put most of the Mousebuttons on Numpad Keys, it works well but the Hotkey Text is annoying and I am looking for a way to customize it in the Dominos Actionbar Addon.

I want the HM, UP, PU, En, PD changed to something like G1, G2, G3, G4.

I looked around in the Internet and found a script, this one:
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 )', 'G')
    text = string.gsub(text, '(Page Up)', 'G1')
    text = string.gsub(text, '(Page Down)', 'G2')
    text = string.gsub(text, '(Spacebar)', 'SpB')
    text = string.gsub(text, '(Insert)', 'G3')
    text = string.gsub(text, '(Home)', 'G4')
	text = string.gsub(text, '(F5)', 'MBD')
    text = string.gsub(text, '(F6)', 'MDB1')
    text = string.gsub(text, '(F7)', 'MDB2')

    hotkey:SetText(text)
end
hooksecurefunc("ActionButton_UpdateHotkeys", updatehotkey)
So I loaded the Script and it works like a Charm with the Blizzard Custom UI Bars, but sadly it is not working with Dominos. I guess Dominos overrides the Blizzard Bars and therefore the Custom Keybindings Texts are not working anymore.

My question to you is now, what can I do to combine these two Addons, the one created with the help of the Script and Dominos.
I started looking at the Dominos .lua file for the Action bar and put the code in, but that didn't work of course, because the file is filled with a lot of Code and I am not sure where to begin.

Can you give me some advice on how to do that or is that way over my head?
I am happy about any advice.

Regards.

Last edited by Noresa : 10-21-19 at 07:02 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Add a script LUA to Domino Bar Addon Hotkeys


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off