Thanks @Davy Alves for helping out but it seems @ShadowMaker SdR cracked it (for me).
ShadowMaker SdR wrote: ↑1 year agoI am not 100% sure, but I think == is used for checking values i.e. iff something == something then etc, but to set the value you use a single =
But I could be wrong about this. I am a bit confused, because I seem to recall you opening and closing nests in almost every tool you've created so what's diffent in what you're trying to achieve here?
Woop! Yep. That was it. Using a single = for setting the "state" worked. Ah, the struggles of not really knowing the basics of things.
It's like I always say, quietly to myself with clenched fists: Live and eventually, hopefully, maybe, perhaps, don't bet on it but who knows, possibly learn!
Now with my confusion out of the way, let's tackle yours:
On a general level I wanted to know how to do it since I've been messing around with the INPS_ExecuteOnChange thing. I know how simple expressions work (which is what I'm using, as you say, in probably every macro I've ever done). But scripts works differently and I find myself not being able to do even the most simple things. You know, due to a lack of coding skills.
Specifically by opening/closing the nest using a INPS_ExecuteOnChange on a MultiButtonControl I've gotten a bit more control over when that happens vs doing it using an expression like I usually do. At least I think I have more control:) Maybe I could get the thing I was trying to achieve to work using expressions (though I haven't been able to yet).
Basically using expressions to toggle nests has been fine but INPS_ExecuteOnChange has opened up some opportunities where expressions has not been working out for me.
I'll try to make sure to point out exactly where I used the thing (it's not super obvious) when I share my next macro (which is doing some "fancy" UI stuff using INPS_ExecuteOnChange).