Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mouse Trigger
#1
How would I go about making a trigger that performs one task on the mouse click and then another on release.

Essentially I am making a switch utilizing the contact closures on an old usb mouse that will play music when flipped on and then fade out the music when flipped off.

Thanks.
Jimmy Vig
#2
I should have thought about it for like a minute...

out "Down"
wait 0 ML
out "UP"
#3
Quick question to add on to this post...

If a right click down with FF_Mouse 2 filter used to trigger a macro to start, how can I wait for exclusively the right click on Mouse 2 to come up with out other mouses effecting it?

Thanks.
#4
Maybe this info will help.
Macro
Code:
Copy      Help
out "mouse device ids:"
out g_rir.m[0]
out g_rir.m[1]
out g_rir.m[2]
out g_rir.m[3]
out "last used device id:"
out g_ri.mouse_id
#5
helped...but I can't quite figure it.

this code seems like it should work:
Function Function9
Trigger #L 0x8 //FF_Mouse2     Help - how to add the trigger to the macro
Code:
Copy      Help
out
_i=g_ri.mouse_id
out "click"

;Wait
wait 0 ML

out g_ri.mouse_id

if !(g_ri.mouse_id=_i)
,out "waiting"
,goto Wait

out "unclick"

So when I click down on mouse 2 and hold the button, then click and release l button on mouse 1 it says "waiting" just like it is supposed to. Then I unclick l button on mouse 2 and nothing happens until I click and unclick the l button on mouse 2.

I am just not seeing why. Really in my mind it should work just fine, but it doesn't.

Thanks
#6
I don't think mouse up registers at last used mouse.
#7
Yes, it is this code in RI_Input
sel(raw.data.mouse.usButtonFlags) case [2 8 32 128 512] ret ;;up
Can try to move the line below
g_ri.mouse_id=k
But don't know if then everything will work well.


Forum Jump:


Users browsing this thread: 1 Guest(s)