Drag & drop macro with the keyboard

I would like to reproduce with KM what I do with BTT, but unfortunately I don't know how. Maybe someone can help.

Doc E can be moved with drag & drop (mouse). But I would like to do this with the keyboard, shortcut ⌘+arrow up or down moves the doc by one line.

If that helps, I can explain how to do it with BTT.

  • Search for an image. This

  • Move the mouse there.

  • click and hold left mouse button

  • Drag 40 px upwards

  • release left mouse button

Looks like this in BTT. Can someone help me to do this with KM? Thanks a lot!

You don't say what app, so this is untested but might put you on the right track:

Thank you very much @Nige_S . Yes, that works.... So simple, but I would never have figured it out.

Why is the app important? 40px is 40px, no? :wink:

Mm, but KM is significantly slower than BTT. Where is the picture being searched for? On all screens? Ah, no, only in the front window.

Is it also possible to do it this way?

  • Select Doc E (manually)
  • shortcut
  • Select Doc A (manually)
  • same shortcut
  • Doc E is moved under Doc A

Because different apps can have different response times to click-drags -- sometimes you need to split to a click-and-hold, then a drag, then a drop.

Whatever you set the action to -- in the above it's the front window, which seemed a sensible restriction.

Have a go at:

  1. Select doc E manually
  2. Shortcut fires macro which
    1. Stores position of found image
    2. Pauses (loops?) testing for found image until position changes
  3. Select doc A manually
  4. Macro unpauses (found image pos has changed)
  5. Macro clicks at new found image pos and drags to (old pos Y + 40)
  6. Macro exits

Because there might be a better way to do it. Of course, we'll still help without knowing the app, but the results may not be as good.

Thank you both! Understood. The macro works well. Not particularly fast, but reliable. Ah, and the app is Devonthink.