02-06-2013, 06:28 AM
Does not work.
This works, but probably it is not the best way, need more work to combine correctly.
Function mouse_middle_and_wheel_trigger
Trigger #M 0x8
This works, but probably it is not the best way, need more work to combine correctly.
Function mouse_middle_and_wheel_trigger
Trigger #M 0x8
function nCode wParam MSLLHOOKSTRUCT&h
if getopt(nargs)=0
,if(getopt(nthreads)>1) ret
,int-- t_hh=SetWindowsHookEx(WH_MOUSE_LL &mouse_middle_and_wheel_trigger _hinst 0)
,;MessageLoop
,int i=SimpleMouseGestures("") ;;this func processes messages, threfore can replace MessageLoop
,;out i
,ret
;---- this code runs on each mouse event while wheel is pressed -----
;
int-- t_wheel_used
sel wParam
,case WM_MBUTTONUP
,UnhookWindowsHookEx t_hh
,;if(!t_wheel_used) mid ;;don't know why this would make double click, just disabled it
,shutdown -7
,case WM_MOUSEWHEEL
,t_wheel_used=1
,if h.mouseData>0
,,out "forward"
,else
,,out "backward"
,ret 1 ;;eat
ret CallNextHookEx(0 nCode wParam &h)