Page 1 of 1

Macro Button().State not working on 2-position buttons

Posted: Sat Feb 20, 2021 4:45 am
by xcasxcursex
I have a macro set up with a 2 position button. In one of my other macros, I would like to be able to press and release that button twice (turn it off and on again, or on and off again). To do this, I used:


Button(3).State = 1;
Button(3).State = 0;
Button(3).State = 1;
Button(3).State = 0;

The manual suggests this should emulate push, release, push, release. The result should be that the button is in the same state as it was before the macro was run.

This is useful because it allows me to apply settings in the desired order. The example here is that I set volume to zero with the second macro button, and then it either disables and re-enables, or enables and re-disables, the first macro button, which is a volume limiter. This allows me to 'reset' the volume but retain the state of the volume limiter as whatever state it was before I reset the volume.

However it does not. Button().State works the same way as Button().StateOnly; the button is permanently off after the above commands.

Am I doing it wrong or does this need a fix?

Re: Macro Button().State not working on 2-position buttons

Posted: Sat Feb 20, 2021 6:48 am
by Vincent Burel
didn't htink you could change the button state several times in the same script. i have to check if this can work.