Page switching and bindings in expansion?

#0 - Nov. 18, 2006, 4:07 a.m.
Blizzard Post
Here's the code which I changed to use the new in combat commands my question is will it work?

<Bindings>

<Binding name="Page Switch 2" runOnUp="true">
if ( keystate == "down" ) then
/changeactionbar 2
else
/changeactionbar 1
end
</Binding>

<Binding name="Page Switch 3" runOnUp="true">
if ( keystate == "down" ) then
/changeactionbar 3
else
/changeactionbar 1
end
</Binding>

<Binding name="Page Switch 4" runOnUp="true">
if ( keystate == "down" ) then
/changeactionbar 4
else
/changeactionbar 1
end
</Binding>

<Binding name="Page Switch 5" runOnUp="true">
if ( keystate == "down" ) then
/changeactionbar 5
else
/changeactionbar 1
end
</Binding>

<Binding name="Page Switch 6" runOnUp="true">
if ( keystate == "down" ) then
/changeactionbar 6
else
/changeactionbar 1
end
</Binding>

</Bindings>


Basically what it use to do is, while I held down the bound key it would switch the bar and switch it back when I released the key. Now I realize, potentionally, I could do the same thing using the moddifier button:Z, but frankly I like the old ui that I modified and don't want to make a complecated macro for each button.
#14 - Dec. 1, 2006, 10:50 a.m.
Blizzard Post
Sure, if you take advantage of the "macrotext" feature.

e.g.
/script ActionButton1:SetAttribute("type2", "macro")
/script ActionButton1:SetAttribute("macrotext", "/startattack\n/changeactionbar 2");

Then, right clicking on the action button on the left in the default UI will start you attacking and switch to the second action bar.

You can even set up different actions for each mouse button...
/script ActionButton1:SetAttribute("type2", "macro")
/script ActionButton1:SetAttribute("macrotext2", "/startattack\n/changeactionbar 2");
/script ActionButton1:SetAttribute("type3", "macro")
/script ActionButton1:SetAttribute("macrotext3", "/startattack\n/changeactionbar 3");
/script ActionButton1:SetAttribute("alt-type2", "macro")
/script ActionButton1:SetAttribute("alt-macrotext2", "/startattack\n/changeactionbar 4");
/script ActionButton1:SetAttribute("alt-type3", "macro")
/script ActionButton1:SetAttribute("alt-macrotext3", "/startattack\n/changeactionbar 5");


Here the right click will switch to the second action bar, ciicking the middle mouse button will switch to the third action bar, and holding down alt while right clicking will change to the fourth action bar, and holding down alt while middle clicking will change to the fifth action bar after attacking.

This all works with the default 2.0.1 UI, BTW - no addons needed. :)