DragonFlight CLICK bindings broken?

I take that back. Still a mess.
I can get the buttons to work as it was before with ActionButtonUseKeyDown set to true.
I don’t know how to solve the part where my addon will stop working if the user sets the ActionButtonuseKeyDown to false. OMG :slight_smile:

Now on 10.0.2:

When ActionButtonUseKeyDown is 0:

  • /click ClickTest works
  • /click ClickTest LeftButton doesn’t work

When ActionButtonUseKeyDown is 1:

  • /click ClickTest LeftButton works
  • /click ClickTest doesn’t work

/sigh

1 Like

A new variation in today’s 10.0.2 beta build:

When ActionButtonUseKeyDown is 0:

  • /click ClickTest works
  • /click ClickTest LeftButton works

When ActionButtonUseKeyDown is 1:

  • /click ClickTest LeftButton doesn’t work
  • /click ClickTest doesn’t doesn’t work
1 Like

pro…gress?

So I got this Macro on Beta:

/click MultiBarBottomLeftButton4 RightButton
/cast [button:1] Freezing Trap
/cast [button:2,@player] Freezing Trap

It’s placed on MultiBarBottomLeftButton4 , which is keybound to F4.
When I press F4 on the keyboard it places a Freezing Trap at my feet.
When I click the button I get the green placeholder so that I can place it wherever I want.
It’s working great.

But on Live it doesn’t work at all :frowning:
Will it work when DF is officially launched?

The above appeared unchanged this morning, on both PTR and beta (and the latter’s build was dated Nov 10). But testing further, when ActionButtonUseKeyDown is 1 it looks like we need to pass not only the button but a 1 for that down:

When ActionButtonUseKeyDown is 0:

  • /click ClickTest works
  • /click ClickTest LeftButton works
  • /click ClickTest LeftButton 0 works
  • /click ClickTest LeftButton 1 doesn’t work

When ActionButtonUseKeyDown is 1:

  • /click ClickTest doesn’t work
  • /click ClickTest LeftButton doesn’t work
  • /click ClickTest LeftButton 0 doesn’t work
  • /click ClickTest LeftButton 1 works

So for addons that depend on /click to use items or cast spells, they will need to append the GetCVar(“ActionButtonUseKeyDown”) to the /click in addition to a mouse button. (If you register AnyUp,AnyDown you don’t need to spell out LeftButton. In Select I’m doing “/click (button) X 1” instead of “/click (button) LeftButton 1”.

3 Likes

NOW what did they do? Not working again. :face_with_symbols_over_mouth: patch day!

I was able to get it to work like this:

/click ButtonName LeftButton True

Any other details? This doesn’t work for me with

/click ActionButton8 Button5 True

Something like:

/click MultiBarRightButton9

works as expected. Whereas , as described above

button = CreateFrame(“Button”,“LAs1”,nil,“SecureActionButtonTemplate”)
button:SetAttribute(“type”,“macro”)
button:SetAttribute(“macrotext”,’/castrandom Spectral Tiger, Black War Tiger’)

Worked yesterday, and last expansion come to it, /click LAs1 now seems to require LeftButton True to do anything which makes /click far less useful.

Is there something I can do in the button descriptor to eliminate this?

Edit 1: 1 will work in place of True

Edit 2: Upon further investigation (ie, reading another Gello post), it appears, at present, that while you don’t need to register for AnyUp and/or AnyDown, you do now need to pass: “(anything) 1” for /click to work, tho why this isn’t true for default buttons is unclear (to me anyway)

I’m not sure of all the options but, “ActionButton8” may not be an actual button frame name. I use ElvUI, so mine are all patterned logically. The Default UI is not. You’ll need to use /fstack to discover it. Also, I don’t think you can use arbitary mouse buttons in there. So far as I know, only LeftButton and RightButton work (or worked). Gello will likely know more there.

This script puts frame names in chat:

/run local f = GetMouseFocus(); if f then DEFAULT_CHAT_FRAME:AddMessage(f:GetName()) end

Bind it to a key, get the frame name at the mouse location. As I posted earlier, so far as I can tell, it ignores, what is in this example, the Button5 parameter. It just has to be there. Tho, it may simply be ignoring junk not corresponding to mouse button strings.

buttonName = GetMouseButtonClicked()

should return the string of the mouse button being used

You can just type /fstack and move your mouse over the button. Then /fstack again to shut it off. Blizzard provides a nice utility for that.

/fstack is short for /framestack.

If your ActionButtonUseKeyDown is 1 (which it probably is if /click LAs1 doesn’t work):

/click LAs1 LeftButton 1

or since macro space is limited you can also do:

/click LAs1 X 1

I expect this requirement may change but we’ll see. The syntax of a macro shouldn’t depend on the value of a cvar.

To see whether you have 0 or 1:

/dump GetCVar("ActionButtonUseKeyDown")

1 Like

Bang on Gello,

the biggest is problem with this is for addons, you have to set keybinds in an xml file which as far as i know cant be changed once you look at the cvar. Any buttons you create in code can be changed to have the 1 at the end based on the cvar.

Right, that is the syntax that works. But, it does have be a 1. Passing a 0 causes the button to not fire. Neither parameter is required for default buttons though, which still seems odd to me.

If you do /console ActionButtonUseKeyDown 0, then /click buttonname X 0 will start working and /click buttonname X 1 will stop working.

It just happens that for ActionButtonUseKeyDown 0, the mousebutton 0 is not necessary.

Still working, even after some patches, which is awesome. Now, if I could figure a way to get mounts with a comma in their name into a /castrandom…

How do I apply these changes to wanting to /click on Blizzard stuff? I have a specific example I don’t understand.

The PvP frame within LFD tool. If I run this one:

/run HonorFrame.BonusFrame.Arena1Button:Click()

It will select the Arena Skirmish as expected. But, since I’m sticking that in a /run, its applying taint to whatever code that Button sets, so I want to avoid potential problems in the future.

If I use this one, it just doesn’t work:

/click HonorFrame.BonusFrame.Arena1Button

I’ve tried variants suggested in this post like:

/click HonorFrame.BonusFrame.Arena1Button 1
/click HonorFrame.BonusFrame.Arena1Button 0
/click HonorFrame.BonusFrame.Arena1Button LeftButton
/click HonorFrame.BonusFrame.Arena1Button LeftButton 1
/click HonorFrame.BonusFrame.Arena1Button LeftButton 0

Nothing seems to work. What’d they do to our /click command!

I don’t know if HonorFrame.BonusFrame.Arena1Button:Click() was possible before this expansion-it would’ve if the button/action wasn’t protected–the inability to /click HonorFrame.BonusFrame.Arena1Button is not new behavior.

/click expects a named button. Anything with a . in it is usually not a name but something named with properties and sub-properties. (Technically, . can be in a name, but it’s like spaces in SQL column names, something only evil people do.)

If something includes . and you want to see if it has a name:

/dump HonorFrame.BonusFrame.Arena1Button:GetName()

In this case it either gives an error due to HonorFrame not existing because you didn’t open the LFG PVP window yet, or it says empty result after you open the LFG PVP window.

A secure way to click these anonymous buttons is to setup a named clickbutton out of combat and click that. Obviously, the /click has to happen in a macro (or a macrotext secure button.)

/run if not CxB then CreateFrame("Button","CxB",UIParent,"SecureActionButtonTemplate"):SetAttribute("type","click") CxB:SetAttribute("clickbutton",HonorFrame.BonusFrame.Arena1Button) end
/click CxB X 1

(If you hit this before opening the LFG PVP window it will have no effect until you reload/logout. You will need to /reload, open LFG PVP and then hit the macro.)

The messed up part is /click CxB depends on your ActionButtonUseKeyDown cvar.

If ActionButtonUseKeyDown is off (0):

/click CxB

If ActionButtonUseKeyDown is on (1):

/click CxB X 1

That’s the bugged part.