DireBloodWolf, on 02 June 2013 - 05:02 PM, said:
I'm trying to get autohotkey to work for mapping the scroll wheel, and it is just not working. can someone tell me what i'm doing wrong:
It works in notepad but not in MWO.
Got to say, I haven't tried mapping things to mouse buttons thats much, so it could just be that CryEngine doesn't like it that much... Also you could try adding delays to the keys to ensure that CryEngine catches them, the script might be releasing the keys before the game can register them as pressed at all. Something like this:
send {z down}
sleep 60
send {z up}
or with SetKeyDelay perhaps.
Also I know its possible to bind the mouse without a 3rd party program like AHK in the middle. It would require you to be able to rebind the left and right mouse wheel buttons to Mouse 4 / 5 or even the keys themselves. That would allow the left and right to detected by MWO easily.
As for mouse wheel up / down you have to get a bit naughty and edit the actionmaps.xml. A bad thing to do 'cause they don't like us editing xml files anymore. A good thing to do 'cause MWO doesn't play nice with the mouse wheel any other way. Just add these lines into the actionmaps file:
<action name="m_toggle_zoom_mode"> <rebind device="keyboard" input="mwheel_up" index="1" defaultInput="mouse3"/> </action>
<action name="m_toggle_4x_zoom_mode"> <rebind device="keyboard" input="mwheel_down" index="1" defaultInput=""/> </action>
Wintersdark, on 02 June 2013 - 05:05 PM, said:
Hawt. Probably the title match mode there that fixes it. I'd originally used Mechwarrior Online with the window title, but it was very inconsistent - would work sometimes, and not others, so I just went to window class (as I'm not playing other CryEngine games) which has worked quite a bit better for me.
Why detecthiddenwindows?
Also, having T or Y toggle a chat variable is pretty clever, I hadn't even considered it. Would remove the necessity to tap backspace very quickly to toggle chainfire without double-toggling it
I tend to include detecthiddenwindows in most scripts where I need to check or manipulate windows. Had loads of problems with a program that wouldn't work without it before so I just include it in most scripts now.