Click & Drag Won't Work in the Finder

Hello
I made a command for "click". It works as click; but you can't drag anything. I have tried all the options including "and hold". I thought that might work; but it doesn't.

Is there a way to get the click button to be able to drag. The other options don't work for me because I drag to a different spot every time.

Thank you,
Terry

It depends on the application.

You may be able to use the Click and Drag Mouse action, or you may be able to use the sequence:

  • Click and Hold
  • Pause
  • Move Mouse
  • Pause
  • Release Mouse

Or it may be that the target application is sensing the button hardware directly and none of that will work.

I'm in Finder during test.
Your first step - * Click and Hold - is the operation that I am saying is not working because it is not holding. :grinning:

Post your macro.

“and hold” will only continue to hold as long as:

  1. The macro continues to execute.
  2. No real physical UI happens.

Hey Terry,

If you haven't read these they're worth a couple of minutes of your time"

Tip: How Do I Get The Best Answer in the Shortest Time?

How to Post Your Macro to the Forum

In cases like this one words are largely useless – we need a proper test case and a macro to test.

We also need to know what version of Keyboard Maestro and what version of macOS you're using.

-Chris

> “and hold” will only continue to hold as long as:
> 
> 1. The macro continues to execute.
> 2. No real physical UI happens.

Once the click clicks the selection - it thinks it is done executing.
The folder lights up like it is selected - but it doesn't hold for me to drag.

Is there some reason you are not using the KM option to drag in the Move or Click Mouse action?

image

Hi J,
The reason is because every time I move a folder or window on my screen, I move it to it's own unique place. If I use "and drag to", every thing I click will move to the same place.
Terry

Once the macro ends, all held down buttons and keys are released.

Indeed, if the image above was not cutoff, it would show the yellow warning triangle:

image|301.5x85.5

which would reveal this alert:

A held key, modifier or button will be released when
the macro completes, so doing it in the last action
may not accomplish anything (unless this macro is
executed from another macro). Consider adding a
Pause or Pause Until action after this action (or a
Comment to disable the warning).

What do you mean by "place"? Could you located the "place" by either found image or mouse location, or some other means?

If so you could do this:

  1. Select the file/folder in the Finder, using a List view
    • This creates a unique image between the left edge of the File Name and the Finder window:
      image
    • Use Find Image get the FromLocation coordinates
  2. Locate your destination Place -- save in KM variable ToLocation
  3. Now do the Move Mouse with Dragging using the FromLocation and the ToLocation

Here's my example Macro that drags a file selected in the Finder to the KM Forum "Create Topic" editing area.

Let us know if this will work for you.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MACRO:   Drag/Drop From Finder to Destination [Example]

**Requires: KM 9+   macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

#### DOWNLOAD Macro File:
<a class="attachment" href="/uploads/default/original/3X/9/2/92a8158df14981be59d0ab211edc227d3cff3fd6.kmmacros">Drag-Drop From Finder to Destination [Example].kmmacros</a>
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**




---



<img src="/uploads/default/original/3X/9/e/9e1f82a13ce20c8f2f3babee388714bd7b37ded6.png" width="502" height="892">

Hi J,

What I mean by place is that -

  1. I'm working with more than one window open.

  2. I have to move one window two inches to the right because it is covering up the other window.

  3. I have to move the window up because even if I scroll, I can't see the bottom of the page.

  4. I am trying to find a certain open window; but the screen is full and I have to unbury my window so I can see it.

  5. The desktop is messy and I need to move some folders in line.

  6. I have a certain folder or safari page or text document and I want to put it in the corner so I know where it is at when I need it.

So you see every situation is unique. Sometimes I only need to move it an inch and other times I have to move across the whole screen. Sometimes to the right and sometimes to the left.

Thanks for helping,

Terry

This is off the subject - but you might know.....

On the desktop it is nice to sort by name.....

Every thing is in place...

Then I want to move an item 2 inches to the left..... - but it won't stay there - it goes right back from where I dragged it.

So I change the view menu from "sort by name" to "none".......

But now all the desktop items are scattered all over the screen as they were before the sort by name....

They should be able to turn off SORT without reverting back to where it was before....

They should change the name in the view menu from NONE to "completely messed up like before". ha ha Screen Shot 2019-07-25 at 4.00.32 PM.png

Terry

JMichaelTX

    August 19

Terry50:
every time I move a folder or window on my screen, I move it to it's own unique place

What do you mean by "place"? Could you located the "place" by either found image or mouse location, or some other means?

If so you could do this:

  1. Select the file/folder in the Finder, using a List view
  • This creates a unique image between the left edge of the File Name and the Finder window:

    image

  • Use Find Image get the FromLocation coordinates

  1. Locate your destination Place -- save in KM variable ToLocation
  2. Now do the Move Mouse with Dragging using the FromLocation and the ToLocation
    Here's my example Macro that drags a file selected in the Finder to the KM Forum "Create Topic" editing area.

Let us know if this will work for you.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MACRO: Drag/Drop From Finder to Destination [Example]

**Requires: KM 9+   macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

#### DOWNLOAD Macro File:
[Drag-Drop From Finder to Destination [Example].kmmacros](https://forum.keyboardmaestro.com/uploads/default/original/3X/9/2/92a8158df14981be59d0ab211edc227d3cff3fd6.kmmacros)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

Then this sounds more like a window management issue.
Have you tried a macro/script that will list all open windows by app/title, and allow you to pick the one of interest?

Hi

I just tried that.

  1. Preview and safari only open on window at a time.

  2. In another app, if a smaller window is behind a big one, you can't see it anyway.

  3. For folders, there is no "open all folders" macro.

JMichaelTX

    August 20

alt Terry50:

  • I'm working with more than one window open.
  • I have to move one window two inches to the right because it is covering up the other window.
  • I have to move the window up because even if I scroll, I can't see the bottom of the page.
  • I am trying to find a certain open window; but the screen is full and I have to unbury my window so I can see it.
    Then this sounds more like a window management issue.
    Have you tried a macro/script that will list all open windows by app/title, and allow you to pick the one of interest?

Hi

I have a question for you -

Does my macro work on your computer?

If you have "and hold" selected, can you drag a folder while holding down the hot key?

Terry

JMichaelTX

    August 20

alt Terry50:

  • I'm working with more than one window open.
  • I have to move one window two inches to the right because it is covering up the other window.
  • I have to move the window up because even if I scroll, I can't see the bottom of the page.
  • I am trying to find a certain open window; but the screen is full and I have to unbury my window so I can see it.
    Then this sounds more like a window management issue.
    Have you tried a macro/script that will list all open windows by app/title, and allow you to pick the one of interest?

No, I think not -- @peternlewis already explained that.
But what's the point? Why not just hold down the mouse button and drag?

Why even have a "and hold" selection if it doesn't hold any thing? What is it for? If you are going to drag to an absolute position, you don't need "and hold".

Screen Shot 2019-08-20 at 10.00.39 PM.png

JMichaelTX

    August 21

alt Terry50:
If you have "and hold" selected, can you drag a folder while holding down the hot key?

No, I think not -- @peternlewis already explained that.
But what's the point? Why not just hold down the mouse button and drag?

So, if you want to drag something using a macro, you must do it within the Macro.

Hi J,

I got it working with minor drawbacks.

The pause is set for 2 seconds, so you have to complete the drag within that time.

Also, the initial click activates the window; but it doesn't come to the front until after the 2 seconds.

You have to imagine where the drag goes to by watching the cursor cause you can't see the window move.

Terry

Screen Shot 2019-08-20 at 10.14.04 PM.png

JMichaelTX

    August 21

alt Terry50:
Why even have a "and hold" selection if it doesn't hold any thing? What is it for? If you are going to drag to an absolute position, you don't need "and hold".

alt peternlewis:
Once the macro ends, all held down buttons and keys are released.

So, if you want to drag something using a macro, you must do it within the Macro.