Hold Mouse Down and Release

I need to make a macro that hold the mouse down for 2 seconds then releases it for 3 seconds

There is a nice command line tool that seems to work fine for this kind of things: MouseTools

  1. Download the compiled tool from the link above
  2. Put it somewhere in the bin PATH [1]
  3. Try this macro:

_[test] MouseTools Click and Hold.kmmacros (2.0 KB)

Set the number of repeats as you like.

[1]: Make sure KM knows of the PATH; if necessary go to KM Editor > Preferences > Variables, create a variable ENV_PATH and set it to the paths where your command line tools live. Separate the paths with :. For example

1 Like

Stupid me. It seems to work with pure KM actions, too:

_[test] KM Click and Hold.kmmacros (3.7 KB)

Well, now you have two ways to do it :wink:


This looks so simple.How embarrassing! But thanks for it anyway!