Re: Mousetrap plugin consistently stops working.

"brucexs-/[email protected] [power-pro]" <[email protected]>
Newsgroups gmane.comp.windows.power-pro
Message-ID <[email protected]>
To use the mousegesture hot key for button 4, I have the following setup: 

1.  In keys setup, check "4" in line ending "signal hot key when mouse down".

 2.  The hot key for mouse 4 has "No wait" checked and the command  (note dot at start)
 .b4mouse(lasthotkeydown)
  
//Script for mouse down
Function B4Mouse(down)
static MouseX, MouseY, last

// Sometimes get two downs in a row and so need to handle
if (last!="" && last==down) do
	local h = win.gethandle("active")
	//win.debug(last, ifelse(h, h.exename, ""))
	if (not down) do
		mousegesture.track(2)
		win.sendmouse("x4 wa 100")
		return
	endif
endif
last=down

if (down) do    // start tracking on down
	MouseX=xmouse
	MouseY=ymouse
	mousegesture.track(1)

else // on up and no movement, just do normal function for b4
	//mousegesture.track(0)
	if(abs(MouseX-xmouse)<25 && abs(MouseY-ymouse)<25) do
		mousegesture.track(2)
		win.sendmouse("x4 wa 100")

	else  / on up with movement, execute gesture
		mousegesture.track(0)
	endif
endif
return
EndFunction


------------------------------------
Posted by: brucexs-/[email protected]
------------------------------------

PowerPro's download site: http://powerpro.cresadu.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.