Vivick Posted November 24, 2016 Posted November 24, 2016 Hey folks, can anyone here tell me how to create mousewheel events in Target scripts? Basically I want to be able to hold one of the WTs coolies in some direction and have this count as continuous mousecrolling until I release the coolie again. Thanks in advance for any help!
Thermal Posted November 25, 2016 Posted November 25, 2016 From the defines.tmh file in the Target install directory: define MOUSE_LEFT 4000 define MOUSE_RIGHT 4001 define MOUSE_CENTER 4002 define MOUSE_BTN4 4003 define MOUSE_BTN5 4004 define MOUSE_X_AXIS 9 define MOUSE_Y_AXIS 10 define MOUSE_Z_AXIS 11 Between the above and this: http://simhq.com/forum/ubbthreads.php/topics/3699590 It seems like the scroll wheel is maybe a mouse axis. Hopefully thats a start. 1
Vivick Posted November 25, 2016 Author Posted November 25, 2016 Thermal said: From the defines.tmh file in the Target install directory: define MOUSE_LEFT 4000 define MOUSE_RIGHT 4001 define MOUSE_CENTER 4002 define MOUSE_BTN4 4003 define MOUSE_BTN5 4004 define MOUSE_X_AXIS 9 define MOUSE_Y_AXIS 10 define MOUSE_Z_AXIS 11 Between the above and this: http://simhq.com/forum/ubbthreads.php/topics/3699590 It seems like the scroll wheel is maybe a mouse axis. Hopefully thats a start. Thanks a bunch, that did it! :thumbup: Its the Z Axis, here is how you do it in case anyone else has the same Problem: ... MapKey (&Throttle, CSR, AXIS(MOUSE_Z_AXIS, 2, 100)); MapKey (&Throttle, CSL, AXIS(MOUSE_Z_AXIS, -2, 100)); ... The 2/-2 values are the step size and the 100 is the timeout between steps in millisconds. The given Values work quite well for me.
Recommended Posts