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.
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:
RANDOM()*0.05+0.07
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 Library Repeat Typing Any Character Until [SHIFT] is Down [Example]
####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/0/00d9222fc8949b46d4481a2d86acc529dcb2d961.kmmacros">Repeat Typing Any Character Until [SHIFT] is Down [Example].kmmacros</a> (4.1 KB)
---
###ReleaseNotes
**The TRIGGER is:**
[OPT] q [CHAR TO REPEAT] [SPACE]
For Example:
`œR`
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.
<img src="/uploads/default/original/2X/c/c113b17ee2bafe53dbf0f97618a7ffe6fb14c54c.png" width="530" height="76">
---
<img src="/uploads/default/original/2X/2/225bcbf2b89f1aac538a2251d959f5c466fe0f71.png" width="640" height="1605">