Hi Don, I've been testing or maybe just playing with the new CTBstate scripting function and I'm not sure if this is an issue or not it just seems odd. Using CTBicon along with the CTBstate function doesn't appear to work properly. I took your example script in the Beta for v12.40.0204 and modified it slightly to have a message pop-up to indicate the CTB "state" condition. See the little script below.
Code: Select all
if (ctbstate() == 1) {
ctbstate(0);
msg "State Off";
//ctbicon(":cfi");
} else {
ctbstate(1);
msg "State On";
//ctbicon(":home");
}
The script "as shown" works fine, but then try the same thing with ctbicon lines not remarked out and see what happens. It appears the the use of CTBicon affects the state in some way. I end up seeing the "state on" message and the "home" icon and the state is "on", but I never see the "cofi" icon only the default CTB icon and the state never goes off. Am I missing something or doing something I shouldn't...can you not change the CTB icon using CTBicon with a state change? Like I said I was just testing.
Thanks,
Ken