CTBstate along with CTBicon

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

CTBstate along with CTBicon

Post by klownboy »

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

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: CTBstate along with CTBicon

Post by serendipity »

Yes, tried with my examples too and not working. Using icon state turns my custom icons to generic ones.
I thought I am not using it right.

admin
Site Admin
Posts: 67315
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: CTBstate along with CTBicon

Post by admin »

Confirmed, I'll check that.

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: CTBstate along with CTBicon

Post by klownboy »

Hi Don, CTBicon and CTBstate work fine together now in v12.40.0205. :appl: Now to dream up some nice ideas for using CTBstate. :idea:
Thanks,
Ken

Post Reply