I am brand new to using Keyboard Maestro after finding that AHK was not an option for me as a MacOS user. So, naturally I spent 8 hours straight overnight attempting to design a scrip from scratch via chat GPT. Needless to say it didn't work.
My goal for the script was to have the following attributes:
Hot keys for start/stop (\ = start; ' = stop)
Rapid spam of space bar with a simultaneous left click in one spot
Randomized movements/time ranges
Mouse movement: I wanted the cursor to remain in pretty much the same ~quarter inch area of the screen, but I wanted completely randomized micro movements ~tenth of an inch. After a random movement in whichever direction it randomly selected at a random time, I wanted the next movement to always return to its original starting point (again, at a random time). That way the cursor never fully leaves the intended area.
Various click time range: ~600ms per left click with a randomly selected range of +/- 3 (597ms-603ms)
I'm having trouble with understanding the format/layout of how things are supposed to go, and of course since I'm new, I don't have the full scope of the program regarding all tools at my disposal. I couldn't even get the script to start. Any help is greatly appreciated!
The length of the Pause will determine the rough repeat rate for the Space key. I would recommend it not being much faster than 10 times a second.
This is more precise that you will be able to do reliably with Keyboard Maestro. It executes actions at roughly one action per ms (by design), so this kind of accuracy is unlikely to be practical.
Given the different timing of the two processes, probably better is to use one macro for each.
I ended up using four seperate macros: One to start the script, one to click, one to spam space, and another to end the macro.
The result: a cluster of poorly executed/disorganized functions which happened to work exactly how I wanted it to LOL.
One click every 0.597 to 0.603 ms while spamming the spacebar and random mouse movements (determined by % chances) within the specified coordinates. I've already had a few more projects since last week and am starting to catch on to Keyboard Maestro Nicely.