Click and drag to position relative to main screen?

Using DevonThink Pro Office and Airmail.

Trying to set up a macro that will drag the email under the current mouse position to a spot relative to the lower right corner of the main screen. Can this be done? Seems the closest I can do is set a destination relative to the mouse position, but that won't work because the email in question could be anywhere on the page. In other words, the originating location will vary, but the destination location will be constant relative to the edges of the screen.

The reason is this method of importing email results in the best file in DevonThink -- other ways of importing an email message don't give me rich text -- all plain text and no hyperlinks or email headers. Manual click & drag into the inbox utility on the side of the screen yields the best results. Something to do with the AppleScript interface used by Airmail.

What I need is KM to "drag to position relative to screen" or "drag to absolute position on screen" but not "relative to the current position of the mouse." Possible?

TL;DR - Need to click and drag from the current mouse position to an absolute position on the screen (or relative to the corner), then drop the item that was dragged.

Thanks in advance. If it can't be done, so be it.

Should be no problem. See Move or Click Mouse action (KM Wiki).

That’s the documentation I was reading, and it doesn’t seem like you can specify a destination that is A) absolute on the screen, or B) relative to the corner of the screen. You can specify the point of origin with those adjustments, and you can specify the destination relative to the current position of the mouse. I need to specify the destination without being relative to the position of the mouse, since the point of origin will vary. The target/destination will be constant.

You can do that, and much more.
Wherever there is a numeric field, you can enter a function/formula if you wish.

See SCREEN function (KM Wiki).

Both of these drag FROM the current mouse position, but you could use formulas there as well to select the FROM position.


Perfect, thank you very much! Did not know you could enter a formula there!

1 Like