Posts: 1,000
Threads: 253
Joined: Feb 2008
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
Posts: 1,000
Threads: 253
Joined: Feb 2008
I should have thought about it for like a minute...
out "Down"
wait 0 ML
out "UP"
Posts: 1,000
Threads: 253
Joined: Feb 2008
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.
Posts: 12,073
Threads: 140
Joined: Dec 2002
Maybe this info will help.
Macro
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
Posts: 1,000
Threads: 253
Joined: Feb 2008
helped...but I can't quite figure it.
this code seems like it should work:
Function
Function9
Trigger
#L 0x8 //FF_Mouse2
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
Posts: 1,000
Threads: 253
Joined: Feb 2008
I don't think mouse up registers at last used mouse.
Posts: 12,073
Threads: 140
Joined: Dec 2002
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.