TB Cycle with Indicator [script]

Discuss and share scripts and script files...
Post Reply
klownboy
Posts: 4398
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

TB Cycle with Indicator [script]

Post by klownboy »

At first I was thinking, seeing the button set number on the toolbar was really not necessary. I still think that, but I'm starting to like the idea, necessary or not. This is my version of a Toolbar Cycle with Indicator. The script will cycle toolbars along with having visual indication of the current toolbar set number on the CTB. No dropdown menus; just click on the CTB. You can also use the same script to cycle toolbars with a User Defined Command (UDC) and have the same visual indicator on the CTB you've set up. In use, the UDC actually may be the better operationally. It will work whether you have 2, 3, or 4 toolbars.

- Place the script in you script folder and place the 4 icons included in your <xyicons> folder. I really like Kunkel's white version numbers. They look great going from light to dark modes. Thanks Kunkel.
- Make a new CTB with a name of "Toolbar Set #1". Though the name actually doesn't matter at this point. For left click assignment use:
load "<xyscripts>\TB Cycle with Indicator.xys"; You can leave the icon field blank.
- You'll have to add the same CTB to each of your toolbars. It makes sense to place them in the same position left-to-right.
- The first run only, the script will determine the CTB number and insert it in the script.
- For a UDC, select the "Load script file" option and for the name enter "TB Cycle with Indicator" and for the Script File enter,
"<xyscripts>\TB Cycle with Indicator.xys" (no quotes). I set my key assignment as Numpad 5.
- Important - For the first run, click on the CTB such that the CTB index is established). For subsequent runs click on either the CTB or run the UDC.
- If you want to use your own icons, simply change them on lines 31-34.

The script uses a heredoc technique similar to TheQwerty's Gallery Wall script. Thanks TheQwerty.
Please let me know if you have any issues. Thanks.
TB Cycle with Indicator_01.jpg
TB Cycle with Indicator_01.jpg (11.19 KiB) Viewed 2427 times
TB Cycle with Indicator_02.jpg
TB Cycle with Indicator_02.jpg (21.88 KiB) Viewed 2427 times
Attachments
TB Cycle with Indicator_v0.1.zip
(20.42 KiB) Downloaded 177 times

Horst
Posts: 1340
Joined: 24 Jan 2021 12:27
Location: Germany

Re: TB Cycle with Indicator [script]

Post by Horst »

Thanks for this script.
Works fine here.
Windows 11 Home, Version 25H2 (OS Build 26200.7171)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1402a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

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

Re: TB Cycle with Indicator [script]

Post by klownboy »

Thanks Horst for the feedback.

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

Re: TB Cycle with Indicator [script]

Post by klownboy »

By the way, if you would rather not see the affect of the CBTstate changing (i.e., the background on the CTB) just comment out the 2 lines very near the end of the script. Like so:

Code: Select all

//  $CTB_State = GetToken($newState, 2, '|');
//  CtbState($CTB_State,$ctbindex);
I debated taking that out initially.

Horst
Posts: 1340
Joined: 24 Jan 2021 12:27
Location: Germany

Re: TB Cycle with Indicator [script]

Post by Horst »

klownboy wrote: 06 Mar 2022 18:56 By the way, if you would rather not see the affect of the CBTstate changing (i.e., the background on the CTB) just comment out the 2 lines very near the end of the script. Like so:
I don't see any background effect with that change.
What should I see with this lines enabled or disabled ?
May be my system is to fast :)
Windows 11 Home, Version 25H2 (OS Build 26200.7171)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1402a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

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

Re: TB Cycle with Indicator [script]

Post by klownboy »

Horst wrote: 06 Mar 2022 19:23 I don't see any background effect with that change.
No, before commenting out those 2 lines when cycling the toolbars back and forth you may have noticed the background of the CTB changing sightly due to a CTBstate change (i.e., the affect you normally see when you make a toolbar button activate or not). I think you would have noticed the active or inactive background affect whether in light or dark mode. You would notice the CTB button background affect (active), not during the change, but after changing to button set #2 or button set#4.

Horst
Posts: 1340
Joined: 24 Jan 2021 12:27
Location: Germany

Re: TB Cycle with Indicator [script]

Post by Horst »

Ok, now I understand and see.
I left the 2 lines commented out now.
Windows 11 Home, Version 25H2 (OS Build 26200.7171)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1402a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

Post Reply