I created my first macro following chatgpt but it times out after a few seconds. Please help, take it ease I'm a noob.
Toggle Keystroke 125ms.kmmacros (3.4 KB)
Simulate Keystroke Loop.kmmacros (3.2 KB)
The issue appears to be that you've written a macro that calls itself. This usually doesn't work, because the KM Engine aborts when any "stack" of called macros exceeds 50.
Instead, you need to use a Loop action, like the While action.
For example, your loop macro probably should look like this:
I didn't actually run your macro with my proposed change, but it looks to me like it will work if you use my change.
However may I point out that you don't actually need two macros. You can just place the While loop in the parent macro, instead of calling the child macro.
May I also point out that the Cancel action isn't necessary, because there's nothing after the IF action which would mean the Cancel action doesn't really make a difference in this case.
Did ChatGPT really tell you to write a recursive macro that way? If so, that was faulty advice.