WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   SetBinding issues (https://www.wowinterface.com/forums/showthread.php?t=57816)

doofus 02-13-20 02:07 AM

SetBinding issues
 
Hello.

I have used SetBinding to tie keystrokes to macros. These are saved in bindings-cache.wtf.

If I change the binding key of a macro, the old binding is still present in this file, and I cannot get rid of it, or know what other bindings this macro has. The only solution is to manually delete bindings-cache.wtf.

Is there an API I can use to delete all bindings present for a specific macro ?

Thanks

SDPhantom 02-13-20 06:02 PM

You can send nil as (or completely omitt) the second argument to SetBinding() to remove the key from all bindings.

I don't know if GetBinding() works on custom bindings. It might not.

doofus 02-16-20 03:52 AM

Thank you, however it is the opposite function I need,

1) delete all key-bindings for a specific macro without knowing how many bindings exit for that macro
2) delete all key-bindings for all macros

SDPhantom 02-17-20 05:11 PM

Quote:

Originally Posted by doofus (Post 335150)
Thank you, however it is the opposite function I need,

1) delete all key-bindings for a specific macro without knowing how many bindings exit for that macro
2) delete all key-bindings for all macros

Reiterating:
Quote:

Originally Posted by SDPhantom (Post 335137)
I don't know if GetBinding() works on custom bindings. It might not.

On another note, if you know the command string, you might try GetBindingKey(), but like the other function, I don't know if this works on custom bindings. If neither of them do, then you're out of luck. That's all the API has for iterating through permanent ones.

There is a series of functions for override bindings, but that's a completely different system.


All times are GMT -6. The time now is 06:04 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI