Psyclum: in general, it's bad UI or product design if a control has more than one function. There are some specific cases where it's less of an issue, though.
I'm looking into whether you can emulate what you're trying to do with a LUA script using IS_MOUSE_BUTTON_PRESSED and IS_MOUSE_BUTTON_RELEASED with SetDPITable() and SetDPITableIndex(). I don't really have a ton of time to spend during the work day on it, though, and since I'm not the guy who wrote the LUA interpreter (and I'm not actually a coder at all) I don't know how quickly I can get that done.
Edit: got it, sort of. You can't do it with button 1 or 2 right now because the engineers were concerned that, given the frequency with which these buttons are used in general, it might be cause people problems if their scripts were constantly reacting on those button clicks. There is a workaround, though.
Assign the thumb button used for "Forward" or "Back" to "Right Click" or "Mouse2" for your game's profile
Assign the right mouse button to "Forward" (Mouse5) or "Back" (Mouse4) depending on where you put the "Right Click" assignment
Click the dropdown arrow on the right side of the Profile icon and choose Scripting
Replace the ENTIRE default script with the following (in this example I use Mouse4, but if you want it to be Mouse5 just replace the 4 with 5):
Code:
function OnEvent(event, arg)
SetMouseDPITable({400, 1800}, 2);
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
SetMouseDPITableIndex(1);
end
if (event == "MOUSE_BUTTON_RELEASED" and arg == 4) then
SetMouseDPITableIndex(2);
end
end
Assign your scope function in-game to your new right mouse button (Mouse4/Back or Mouse5/Forward), and reassign the thumb button to whatever function it had before.
This will give you a LUA-scriptable button in the physical location where you're used to having your scope, and will set the button to switch to 400 DPI when you press that button, and to 1800 when you release it. It will also make the default resolution for that profile 1800 DPI. You can play with these values to suit your needs, and you can create more DPI levels and control them with the other buttons if you wish. And this will only apply to whatever profile you sync it to, meaning you won't have incorrect functionality on the right mouse button outside of the game.
Edited by CPate - 9/14/12 at 10:43am