Mouse Click Drag Fix

Hello,

I am asking help from the gurus here.
I have a Macro group here that need a little help.
Although it function but somehow not as intended. Can anybody help here?
Thank you in advance.

What I want to achieve is:

  • First to save the current mouse coordinate into a variable called "MouseLocation".
  • Click and hold at the Current Mouse Position.
  • Move the Mouse Horizontally(Left/Right at 10 pixel) relative to the Current mouse position.
  • If no mouse movement is detected within .3 seconds, the mouse releases and return the mouse position to the original Position saved as variable "MouseLocation".

Mouse CLick Drag.kmmacros (10.1 KB)

Macro Image

But what happens if movement is detected?

It will loop the mouse move action of -10 or 10 pixel (horizontal)

OK -- so it looks like you want to control mouse movement with MIDI signal changes?

I don't think you can use MIDI signals in a Condition. So you might have to split this into multiple macros -- an endlessly-looping "Move Cursor" that does the movement, a "Start Move" macro that triggers "Move Cursor", and a "Stop Move" (presumably triggered by "Controller changes to 0" or similar) that cancels "Move Cursor".

But I don't know much about MIDI. Try changing your post's title to something like "Click and drag with MIDI controller" to catch the attention of those who do, and search the web for "keyboard maestro midi controls mouse" to get some ideas.

Trigger can be change to F19 and F20

Can you show me a hint of what to do? thank you.