Home Forums Macros Loopers will not reset In and Out selection within Matrix Macro Reply To: Loopers will not reset In and Out selection within Matrix Macro

#6279
Philippe OllivierPhilippe
Keymaster

Thank you.
So I could make some investigation…
And it appears that Sleep is the culprit !

In the Sleep documentation it is written “Important difference with WaitDuration: A Sleep action will be interrupted if the macro receives a User Action. No option can change this behaviour. If you want to wait a duration without the risk to interrupt it, use WaitDuration action.”

And in a Matrix, the macro will receive many user actions like button down, button up, button long press, etc. So, if the macro is Sleeping and receives a new action, it will stop immediately. That will not be the case with all Wait… actions. So you should use WaitDuration in place of all Sleep.

I recommend using WaitDuration in every situation as it is more robust. Sleep was an old action, we keep it for legacy compatibility.

We will see if that’s possible to produce an error when a Sleep appears in a matrix macro.
Best,
Philippe