Attempting a mild reskin of the Battlefield Minimap (Shift+M) but I'm stumped at a simple little thing.
The tab highlights on a mouse over and I cannot figure out how to stop that. Everything else has been fairly easy but I've been hunting and trying various things for hours to hide this mean little highlight.
[ADDON_ACTION_BLOCKED] AddOn "aaaBinds" tried to call the protected function "SecondaryProfession4SpellButtonRight:Show()".
!BugGrabber-r188\BugGrabber.lua:587: in function <!BugGrabber\BugGrabber.lua:587>
<in C code>
FrameXML\SpellBookFrame.lua:1037: in function "FormatProfession"
FrameXML\SpellBookFrame.lua:1078: in function "SpellBook_UpdateProfTab"
FrameXML\SpellBookFrame.lua:160: in function <FrameXML\SpellBookFrame.lua:139>
nil
[ADDON_ACTION_BLOCKED] AddOn "aaaBinds" tried to call the protected function "PrimaryProfession2SpellButtonBottom:Show()".
!BugGrabber-r188\BugGrabber.lua:587: in function <!BugGrabber\BugGrabber.lua:587>
<in C code>
FrameXML\SpellBookFrame.lua:1040: in function "FormatProfession"
FrameXML\SpellBookFrame.lua:1074: in function "SpellBook_UpdateProfTab"
FrameXML\SpellBookFrame.lua:160: in function <FrameXML\SpellBookFrame.lua:139>
nil
[ADDON_ACTION_BLOCKED] AddOn "aaaBinds" tried to call the protected function "PrimaryProfession2SpellButtonTop:Show()".
!BugGrabber-r188\BugGrabber.lua:587: in function <!BugGrabber\BugGrabber.lua:587>
<in C code>
FrameXML\SpellBookFrame.lua:1041: in function "FormatProfession"
FrameXML\SpellBookFrame.lua:1074: in function "SpellBook_UpdateProfTab"
FrameXML\SpellBookFrame.lua:160: in function <FrameXML\SpellBookFrame.lua:139>
nil
[ADDON_ACTION_BLOCKED] AddOn "aaaBinds" tried to call the protected function "SecondaryProfession2SpellButtonLeft:Hide()".
!BugGrabber-r188\BugGrabber.lua:587: in function <!BugGrabber\BugGrabber.lua:587>
<in C code>
FrameXML\SpellBookFrame.lua:1036: in function "FormatProfession"
FrameXML\SpellBookFrame.lua:1076: in function "SpellBook_UpdateProfTab"
FrameXML\SpellBookFrame.lua:160: in function <FrameXML\SpellBookFrame.lua:139>
nil
Try adding debug prints inside the for-loop; for example, if you add this line right after the SetOverrideBinding call (but still inside the loop, before the "end"), it will print a message for each binding as it's set, telling you what key is being bound to what:
Also, make sure you have BugSack installed and enabled; generally when some things are working but others are not with no apparent reason, there is a Lua error occurring.
Yep, I had been trying debug statements like this but I wasn't getting anywhere. Actually the local variable hint above is what got me sorted out.
Got it working now. Thanks for the breadcrumbs guys!
local outside
if pancakes = 5 then
outside = 12
end
print(outside) --> 12
Basically, just declare a local right before the if statement (outside it). If you want the variable available at the function level, just declare it outside any functions (still with local).
I am following this to a point. I tried out exactly what you have and it was acting funky, so I tried this:
local MacroBindings = {
F1 = "/run print('F1')",
F2 = "/run print('F2')",
F3 = "/run print('F3')",
F4 = "/run print('F4')",
F5 = "/run print('F5')",
F6 = "/run print('F6')",
F7 = "/run print('F7')",
F8 = "/run print('F8')",
F9 = "/run print('F9')",
F10 = "/run print('F10')",
F11 = "/run print('F11')",
F12 = "/run print('F12')",
}
local ButtonNames = { "LeftButton", "RightButton", "MiddleButton", "Button4", "Button5" }
local count = 0
for key, macro in pairs(MacroBindings) do
-- Increment the count:
count = count + 1
-- Figure out which click to simulate:
local click = count - (5 * (count % 5))
-- Figure out which button to use
local buttonName = "FuncButSet" .. (1 + (count % 5))
-- Get a reference to the button, or create it if needed:
local button = _G[buttonName] or CreateFrame("Button", buttonName, nil, "SecureActionButtonTemplate")
-- Set the attributes:
button:SetAttribute("type"..click, "macro")
button:SetAttribute("macrotext"..click, macro)
-- Set the binding:
SetOverrideBindingClick(button, false, key, buttonName, ButtonNames[click])
end
When I press the buttons, this is what happens:
F1: Nothing
F2: Nothing
F3: Nothing
F4: Prints "F4"
F5: Prints "F5"
F6: Nothing
F7: Nothing
F8: Prints "F4"
F9: Prints "F9"
F10: Nothing
F11: Prints "F4"
F12: Nothing
(Yes, globals bad. I'm still trying to figure out how to set variables in an if statement without using globals... I'm used to dabbling in PHP.)
Followed your link here but I have no clue what is going on! Do I put this in a macro or is this some lua wizardry? I hate sounding like an idiot but while I can follow the code, I have no clue how to implement it. Any direction would be appreciated.
I uploaded what will hopefully work for you. Just install it like any addon.
The one file with lua code in it is fairly self explanatory.
Just change the bar numbers to match the ones you want. I set it to 2-10 assuming you only want bar 1 visible.
One thing that I do is to set the bars I want to toggle to hidden in each of their visibility settings. This way they're automatically hidden when I log in.
Also, toggling visibility does not work in combat so make sure they're off the side somewhere in case you forget to toggle them off before your tank pulls or you get ganked. :P
The slash command is /togglebars and it's bound to SHIFT+B in my script. You can also change these to whatever you like within the one lua file.
I play with 9/10 bars set to always hide since I've had the same binds for years now. My question is, is it possible to make all the bars visible with a /bar command? Going to through the settings and disabling the always hide option on each bar is very tedious.
Check out my Bartender Bar Toggler post. If you need help getting it to work, just post there and I can give you some direction.
0
0
The tab highlights on a mouse over and I cannot figure out how to stop that. Everything else has been fairly easy but I've been hunting and trying various things for hours to hide this mean little highlight.
There are two instances of this texture (UI-Character-Tab-Highlight) being used in http://wowprogramming.com/utils/xmlbrowser/live/AddOns/Blizzard_BattlefieldMinimap/Blizzard_BattlefieldMinimap.xml.
Any ideas to disable or hide this little bugger? Thanks.
0
Code in its current state:
Not sure why this would be called during combat? The registered event is PLAYER_LOGIN.
0
Yep, I was in a hurry and didn't know you could assign keys that way. I changed it the next day after my post to the way you show here. :P
0
Yep, I had been trying debug statements like this but I wasn't getting anywhere. Actually the local variable hint above is what got me sorted out.
Got it working now. Thanks for the breadcrumbs guys!
Now perhaps I'll work on setting up an in-game config for this.
Kind of a silly add-on but I needed a project to get me started.
0
Wow. Don't know how I missed this... thanks!
0
When I press the buttons, this is what happens:
F1: Nothing
F2: Nothing
F3: Nothing
F4: Prints "F4"
F5: Prints "F5"
F6: Nothing
F7: Nothing
F8: Prints "F4"
F9: Prints "F9"
F10: Nothing
F11: Prints "F4"
F12: Nothing
(Yes, globals bad. I'm still trying to figure out how to set variables in an if statement without using globals... I'm used to dabbling in PHP.)
0
I'm still learning here but I'd like to go a step further:
How do I set the "owner" argument in SetOverrideBindingClick from a variable?
That seems to be the only sticking point here at the moment.
0
0
I'm trying to assign profession windows to a keybind. I tried this in game and it worked perfectly:
In my code I tried this and it didn't work:
Also tried:
Any suggestions? Thanks!
0
Not sure what the difference is here.
Yep, thanks. I inserted a line or two into bartender myself to handle it.
0
0
Link Removed: http://www.mediafire.com/?e2mxftr29qf66es
I uploaded what will hopefully work for you. Just install it like any addon.
The one file with lua code in it is fairly self explanatory.
Just change the bar numbers to match the ones you want. I set it to 2-10 assuming you only want bar 1 visible.
One thing that I do is to set the bars I want to toggle to hidden in each of their visibility settings. This way they're automatically hidden when I log in.
Also, toggling visibility does not work in combat so make sure they're off the side somewhere in case you forget to toggle them off before your tank pulls or you get ganked. :P
The slash command is /togglebars and it's bound to SHIFT+B in my script. You can also change these to whatever you like within the one lua file.
0
Check out my Bartender Bar Toggler post. If you need help getting it to work, just post there and I can give you some direction.
0
I had found the list in that library but didn't think any of those were the answer. I knew it was the right place, though.
Thanks again.