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

The Virtual Audio Mixer discussions and support...
Post Reply
xcasxcursex
Posts: 136
Joined: Tue Feb 18, 2020 12:04 am

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

Post 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?
Vincent Burel
Site Admin
Posts: 1558
Joined: Sun Jan 17, 2010 12:01 pm

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

Post 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.
Post Reply