Log in

View Full Version : Binding Key/Button to Spellbook or Macro



Falkor
02-14-2009, 06:51 PM
"Some useful information I found while scanning the wow-europe forums that I thought people might be interested in since I now use this and have no interface bars on screen :)



The following macros, SetBindingSpell, can bind a key or mouse button directly to a spell in the spellbook, thus not requiring the use of an actionbar button for that spell; or, SetBindingMacro, can bind a key or button to another macro. Replace KEYORBUTTON for whatever key or mouse button preferred; replace "SpellName" with the name of the spell in the spellbook, or replace "MacroName" with the name of the macro. (Must be in quotes.)

Notes: Can use a key or button press in the command. (See examples below of valid keys or buttons.) A single key can only be bound to one command. Binding a key to a command that is already bound will result in un-binding the key from the previous command. Cannot set bindings in combat. Also make sure to check the interface keybindings for any default settings that may conflict with custom settings.

For Spells:


/script SetBindingSpell("KEYORBUTTON","SpellName")
/script SaveBindings(GetCurrentBindingSet())

Example:
/script SetBindingSpell("Alt-Q","Renew(Rank 1)")
/script SaveBindings(GetCurrentBindingSet())


For Macros:


/script SetBindingMacro("KEYORBUTTON","MacroName")
/script SaveBindings(GetCurrentBindingSet())

Example:
/script SetBindingMacro("BUTTON4","HealAllMacro")
/script SaveBindings(GetCurrentBindingSet())


Unbind Key or Button
To unbind the specific key or button, remove the applicable "SpellName" or "MacroName" or replace with nil.


/script SetBindingSpell("KEYORBUTTON")
/script SaveBindings(GetCurrentBindingSet())

/script SetBindingMacro("KEYORBUTTON")
/script SaveBindings(GetCurrentBindingSet())


Advanced Settings
Note, this is complicated and can accidentally change the bind scope. The following change saves the bindings per character: replace the line:

-----
/script SaveBindings(GetCurrentBindingSet())
to:
/script SaveBindings(2)
-----
The 1 is account bindings, 2 is character bindings.


KEYS / BUTTONS

Keys (Keyboard): (Must be a valid key)
Examples: "W" or "CTRL-F" or "ALT-A", "CTRL-NUMPAD3", "ALT-Left Arrow" etc
Numpad 0 is "NUMPAD0"
----
Buttons (Mouse) : (Must be a valid button)
Examples: "BUTTON4" or "ALT-BUTTON3", etc


MOUSE BUTTON as Option or Modifier
The option [button:##] or [btn:##] works similarly to the modifier button, BUTTON#. Normally a left-click button performs whatever action is in that spell or macro. However if the button option is set, the behavior of a particular macro can be changed. The default button is 1, therefore when activating a macro via a keybinding, it treats it like a Left Mouse button click. The numbered buttons are:
-----
BUTTON1 = [button:1] = [btn:1] = LeftButton (Note, hardcoded, not bindable w/spell)
BUTTON2 = [button:2] = [btn:2] = RightButton (Note, hardcoded, not bindable w/spell)
BUTTON3 = [button:3] = [btn:3] = MiddleButton
BUTTON4 = [button:4] = [btn:4] = Button4 (for those with extended mouse functions)
BUTTON5 = [button:5] = [btn:5] = Button5 (for those with extended mouse functions)

Tanntyn
02-16-2009, 09:36 AM
Is there a GUI in game where we can view this info or do we have to try to remember it? Is there a way someone can whip up a simple GUI to facilitate this so those of us who have memories like a strainer can use it easier?

Maxion
02-16-2009, 01:53 PM
Macaroon lets you bind directly in the spellbook through the gui.

Only problem with this setup (as far as i'm concerned) is to get it to cast on focus target instead of just target, which is why i only use it for non-targeted spells.

Tanntyn
02-16-2009, 05:11 PM
Macaroon lets you bind directly in the spellbook through the gui.. Bindpad is smaller and does what I want. Thanx anyway.

Bigfish
02-17-2009, 10:34 AM
Interesting.