Click and drag without lag in between

I'm trying to make a macro that uploads a file to a webpage. I've got the file in LaunchBar, and I've got the webpage open, so it's just a matter of dragging the file icon from LaunchBar to the webpage's "choose files" button. Thanks to help from JMichaelTX on this thread, I can get the coordinates of the icon and the button, and put them into a Move and Click and Drag action.

The trouble is that there seems to be a pause between KM performing the click and beginning to drag. It's a brief pause, but it's long enough for LaunchBar to display a contextual menu—and while that menu is displayed, the icon isn't draggable, so the attempt to drag the icon fails. When I do this by hand, the icon always drags right away.

Is there a way to reduce the lag between clicking and dragging?

Please upload your macro and take a screenshot

You can control the drag delay with the Set Action Delay action.

Basically, bracket your drag action with these two actions:

image

The default for dragging is 0.6 seconds I believe (which happens twice, once at the start and once at the end of the drag). The delay is quite large because often applications do not handle fast dragging - so you will have to see how it behaves.

1 Like