View Single Post
03-06-13, 02:34 PM   #1
shalom69
A Fallenroot Satyr
Join Date: Feb 2013
Posts: 22
question about key bindings XML LUA

Hey guys I have a question about setting key bindings.

I have a frame in my addon set some key bindings OnLoad with the following lines

in my XML file

Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ .. \FrameXML\UI.xsd">
	<Frame name="BootUpFrame" hidden="true">
		<Scripts>
			<OnLoad	function="Bindings_OnLoad"/>
		</Scripts>
	</Frame>
</Ui>
then the function at the top of my addon

Code:
function Bindings_OnLoad(self)
	SetBindingMacro("k", "Assist Leader")
end
from what I understand this should set my key "k" to macro Assist Leader which does not work in game

I tried this code in my .lua

Code:
function Bindings_OnLoad(self)
	SetBindingMacro("k", "Assist Leader")
	action = GetBindingByKey("k")
	print(action)
end
which outputs

"MACRO Assist Leader"

which indicates at least at the beginning it's bound

also tried

Code:
function Bindings_OnLoad(self)
	success=SetBindingMacro("k", "Assist Leader")
	print(success)
end
which output "1" which means it did the keybind according to API guides

For reference this is basically my multibox addon and it changes a bunch of bindings if I have it activated. If I'm doing arena or whatever I use different keybinds from when I multibox and run PVE.

l must be something simple I'm missing. anyone care to explain?
  Reply With Quote