Simple Mouse Double Click

Hi everyone,

is there a more elegant way to emulate a double click of a mouse button than use a timer?

So what I have to do is to place the mouse on defined positions and keep the left mouse pressed, related to the knob that was turned on my Artutia BeatStep controller. But … if the Stop button was pressed, befor the knob was turned, then then rotation of the knob should have an other behavior - in this situation a mouse position, different from the former one has to be chosen and a left double click must be performed.
So, because of the different actions I have to realize this in two translator steps. One for the first action with the mouse button keeps holding, and another one for the different behavior … but how to realize the double click in a most elegant way? Timer and a third translator?

Thanks for hints
Stef

Hi,

A double click will require a repeating timer with a count of 2 with the outgoing action for each iteration being a mouse click.

So for one translator you have incoming MIDI with outgoing being timer “double click” with 2 iterations.
For the second translator the incoming is timer “double click” with outgoing action of click up and down.

For more complex sequences, you might have to use a global variable with the same incoming action and then increment the variable each time so that only one of the translators fire at a given time.

For instance say you have incoming CC#0 on MIDI channel 1 any value set to ga.
The outgoing action is click down and hold

Initially gb=0 so you only execute the above action if gb is 0 and in rules you increment gb

if gb>0 then exit rules, skip outgoing action
gb=gb+1

Then the next action would be drag with the same incoming trigger

if gb!=1 then exit rules skip outgoing action
gb=gb+1
// set pp based on value of ga (rules excluded here)
pp=ga

Outgoing move mouse right value pp

You also add a watchdog timer to release the mouse click down (do a click up) if the knob has not moved in 1 second

Incoming Trigger :same
Outgoing action : Timer “click up” delay 1000 msec

Finally the click up timer (when the knob stops moving)

Incoming Timer “click up”
Outgoing: mouse click up

As long as the knob is turning, the “click up” timer will never trigger because it gets reset by moving the knob. When it stops moving for more than 1000 msec (1 second), the event triggers therby releasing the mouse. The rules of this timer should also set gb back to 0 so the sequence can start all over.

I posted some examples here in the last week or two,. Search for mouse, or Davinci, or Resolve as I believe this is what the user was specifically asking.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

If you want a Drag operation, this post may be helpful.