
Originally Posted by
junx
You can use the various SetBinding() functions in a script to set keys to macros or commands.
It has three versions SetBinding, SetBindingSpell and SetBindingMacro with each variation taking two arguments: the keyboard or mouse button you want to bind to and the action, spell or macro you want bound.
Examples:
[code:1]/run SetBinding("F1","MOVEFORWARD"); [/code:1]
For a list of all the available actions open your Bindings-cache.wtf file in a text editor.
[code:1]/run SetBindingMacro("ALT-F1","NameOfYourMacro");[/code:1]
pretty self-explanatory. Bind any macro to a key. Does not take up a space on your default 120 buttons.
[code:1]/run SetBindingSpell("CTL-F1","SpellName");[/code:1]
Let's you set any spell in your spell book to to a key. You do not need to include the rank(although you can for things like rank 1 Arcane Explosion or Moonfire) and it will uprank as you level and downrank healing spells on lowbies correctly.
You need to run the following after you use SetBinding or your changes will be lost.
[code:1]/run SaveBindings(2)[/code:1]
The argument is 1 if you want to save these changes to your account-wide keybinding set or 2 if you want to save it to your character specific keybinding set.
Full example:
[code:1]/run SetBindingMacro("F1","MyTotemMacro");
/run SaveBindings(2);[/code:1]
This is the basis for how all the mods that give you hidden keybinds like Clique, Bindpad and so on work. If you are going to be doing a ton of modifying using one of those mods is easiest. For a quick bind here and there you can use the scripts above.
Connect With Us