HELP: Writing a key repeat macro

I'm trying to create a macro that repeats a key when pressed down and is repeated based on random numbers generated between 0.07 and 0.12 so that the repeated key presses seem more human.

Not sure if I'm on the right track, I have seen a few variations reading the forums but was confused and stuck with the right or best way to carry out this function.

If anyone could help it would be greatly appreciated.

This is what i had so far:

What you have is more or less right. There is no need for the Set Variable to Text action, just type the calculation (just the calculation, not the Calculate text token) into the Pause action:


However a problem you will have is that you are holding down the 1 key, checking that the 1 key is down, but then also simulating the 1 key which requires it to be released and then pressed and then released.

So your macro will work, but not using the 1 key as a trigger - use some other key.

See how this works for you. It allows you to repeat any character untll the [SHIFT] key is pressed, OR the max number of keystrokes is made.

###MACRO:   Repeat Typing Any Character Until [SHIFT] is Down [Example]

~~~ VER: 1.0    2016-09-23 ~~~

Repeat Typing Any Character Until [SHIFT] is Down [Example].kmmacros (4.1 KB)



For Example:

You can change the first character of the trigger, "[OPT] q", to any other character that works for you.

Then press [SHIFT] key to stop the macro.

NOTE: This macro is uploaded in DISABLED state.
Click the large X in the upper right corner to ENABLE.

It is currently set to stop after 100 keystrokes, but of course you can change that to whatever you want.

Thank you both for the help and contributions, you’ve helped solve my problem! :slight_smile: