Toolbar Cycle and Management

Discuss and share scripts and script files...
klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Toolbar Cycle and Management

Post by klownboy »

I'd been thinking of writing a toolbar management script for a while and recently I noticed over here viewtopic.php?f=5&t=21343 where the OP was looking for a way to cycle toolbars. I decided to make a script in which the main objective is to simply cycle between 2 toolbars. But, I also wanted the user to be able to quickly change the 2 toolbars being cycled. Complete toolbar management is what I was striving for. Via the right click of the CTB (or UDC) there are options to load, save, and delete toolbars, build new toolbars, and modify existing ones.

ToolbarCycle script:
1 - on left click of CTB (or a UDC) cycles between 2 toolbars.
2 - right click of CTB (UDC) the following menu items:
- Select 2 toolbars from a list of toolbars (that you will make) for cycling
- Load and save toolbars from a list
- Build a new toolbar
- Modify an existing toolbar
- Delete toolbars


- The build toolbar option will provide the user with a full list of all the internal XYplorer toolbar buttons as well as your CTBs both "current" and "unused". The buttons on the current toolbar are pre-selected (checked). You can drag buttons into their desired location.
- Toolbars are saved to small text files in a Toolbars folder off of <xydata>.
- You must have at least 2 toolbars saved obviously to be able to cycle toolbars
- The modify toolbar option will provide you with a list of all your toolbars , you'll select one and the script will present a listing of all toolbar buttons and the ones currently being used are checked. The existing toolbar buttons are also on top in the existing position. You can easily uncheck buttons or check new buttons. Keep in mind that you can drag and drop them for placement as you can when you choose the build new toolbar option.
- The script is going to cycle on the 2 toolbars you have indicated for cycling regardless of what your current toolbar is or what you may have just built/modified. Use the option to change the toolbars being cycled.
- Keep in mind if you are using a CTB to run this script (recommended) you should make sure you include that CTB (e.g., CTB25) on all the toolbars you'll be cycling. A UDC is also a good idea for cycling toolbars - probably better.
- Remember to properly save a 'current' toolbar, XYplorer must be saved first I didn't want to do that in the script (incase) you didn't want it at that time).
- If you are building a new one or modifying an existing toolbar, saving in XYplorer is not necessary since we are actually selecting items for the toolbar to save.
- Drag and drop the separator around and hold down control to copy. Make sure you check the box(s) when done or they won't show up.

ASSIGNMENTS:
CTB:

- on left click - load "<xyscripts>\ToolbarCycle.xys";
- on right click - load "<xyscripts>\ToolbarCycle.xys";
UDC:
- Category - Load script file: - <xyscripts>\ToolbarCycle.xys - Assign keyboard shortcut - Numpad 5 (or whatever)
- Category - Load script file: - <xyscripts>\ToolbarCycle.xys - Assign keyboard shortcut - Control Numpad 5 (or whatever)

Thanks for trying the script. Enjoy, especially since there are less things to enjoy these days. Please let me know of any issues.
ToolbarCycle_v1.04.xys
(18.25 KiB) Downloaded 102 times
ToolbarCycle_v1.03.xys
(17.9 KiB) Downloaded 125 times
See viewtopic.php?p=188167#p188167 in this thread for details.
ToolbarCycle_v1.02.xys
(16.33 KiB) Downloaded 115 times
Please note the change in instructions on how to load the script when loading from a UDC (it's simplified). Both are simply <xyscripts>\ToolbarCycle.xys in the "Load script file" category. Do not use the Run script category as I had specified previously.

Keep in mind, you don't have to use this script for cycling toolbars if you don't need it. You can use it simply to create and save new toolbars and load them from a list of your favorites.
ToolbarCycle_v1.01.xys
(16.3 KiB) Downloaded 139 times
ToolbarCycle.xys
(15.95 KiB) Downloaded 136 times
Attachments
ToolbarCycle and Management.jpg
ToolbarCycle and Management.jpg (87.28 KiB) Viewed 3263 times
Last edited by klownboy on 09 Feb 2022 17:37, edited 6 times in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Toolbar Cycle and Management

Post by klownboy »

I realized shortly after posting that the script didn't have the capability to include separator(s) when building a new or modifying an existing toolbar.

This update version 1.01 corrects that omission. A separator is included in the inputselect dialog box. It's not checked. You can move it around by dragging and copy it to desired locations by holding down the control key while dragging. Be sure to check the box(es) when done.

That's it. Thanks again for trying and please let me know if you have any issues (or not). If you've already used the script, you will have to reselect your 2 toolbars to cycle unless you fill in the names at the top of the script since those values are set blank again.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Toolbar Cycle and Management

Post by Horst »

I assigned the script to the left and right click of a user defined button.
To my understanding a right click should allow me to create an new toolbar
but it simply says the same as a left click.
Screenshot - 25.05.2021 , 12_16_47.png
Screenshot - 25.05.2021 , 12_16_47.png (5.21 KiB) Viewed 3067 times
Windows 11 Home x64 Version 23H2 (OS Build 22631.3235)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Toolbar Cycle and Management

Post by klownboy »

I don't have the time 'till later today, but in the meantime can you check that you have this setting in XYplorer.ini ? It is working fine for me (i.e., on right click I get the menu shown in my first post).
CTBNoRClickDefaultCommands=1
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Toolbar Cycle and Management

Post by Horst »

klownboy wrote: 25 May 2021 12:41 I don't have the time 'till later today, but in the meantime can you check that you have this setting in XYplorer.ini ? It is working fine for me (i.e., on right click I get the menu shown in my first post).
CTBNoRClickDefaultCommands=1
It was set to 0, changed it to 1
but still the same behavior.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3235)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Toolbar Cycle and Management

Post by klownboy »

Hi Horst, when using a UDC as opposed to a CTB, the right click menu has to be brought up by a modifier key of the assigned user defined command key not the right click. Please take a look at the notes in the original post. It explains how to use for a CTB and UDC. For a UDC my cycling is done by Numpad 5 and the right click menu is Control Numpad 5. When assigned to a CTB, you can use the left and right click of a CTB with right click bringing up the menu. Make sure you have that assigned CTB in all your toolbars as it states in the notes so that its available in the toolbars to cycles them when using a CTB.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Toolbar Cycle and Management

Post by Horst »

klownboy wrote: 25 May 2021 14:33 Hi Horst, when using a UDC as opposed to a CTB, the right click menu has to be brought up by a modifier key of the assigned user defined command key not the right click. Please take a look at the notes in the original post. It explains how to use for a CTB and UDC. For a UDC my cycling is done by Numpad 5 and the right click menu is Control Numpad 5. When assigned to a CTB, you can use the left and right click of a CTB with right click bringing up the menu. Make sure you have that assigned CTB in all your toolbars as it states in the notes so that its available in the toolbars to cycles them when using a CTB.
Thanks, works now with a CTB
Windows 11 Home x64 Version 23H2 (OS Build 22631.3235)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

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

Re: Toolbar Cycle and Management

Post by Horst »

The right click with CTB works
but It forgets the toolbars I have selected for cycling when I restart XYplorer.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3235)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Toolbar Cycle and Management

Post by klownboy »

Actually I'm starting to think the UDC is the way to go and have the key with a modifier to bring up the menu since the menu is not something you would use as often once you've established toolbars to cycle.

Anyway, it is saving the selected 2 toolbars for me and they are available when I restart so something else is going on. The selected 2 toolbars for cycling are saved up in the beginning of the script in a section called [INI]. Do me a favor, no rush - when you get a chance, try the version 1.02 I'll upload later today. I made some changes way back in the beginning of the year, I can't even remember now specifically what they were, and never posted it. This way we'll be using the same version as far as any troubleshooting. Since it's clean of your personnel toolbars or CTB #, you'll have to re-select 2 for cycling. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Toolbar Cycle and Management

Post by Horst »

klownboy wrote: 25 May 2021 20:41 Actually I'm starting to think the UDC is the way to go and have the key with a modifier to bring up the menu since the menu is not something you would use as often once you've established toolbars to cycle.

Anyway, it is saving the selected 2 toolbars for me and they are available when I restart so something else is going on. The selected 2 toolbars for cycling are saved up in the beginning of the script in a section called [INI]. Do me a favor, no rush - when you get a chance, try the version 1.02 I'll upload later today. I made some changes way back in the beginning of the year, I can't even remember now specifically what they were, and never posted it. This way we'll be using the same version as far as any troubleshooting. Since it's clean of your personnel toolbars or CTB #, you'll have to re-select 2 for cycling. Thanks.
Updated the button but still the same problem.
If I restart XYplorer I have to reselect the toolbars bevor I can cycle.
This is independend of having only 2 toolbars or 3 for example.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3235)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Toolbar Cycle and Management

Post by klownboy »

Hi again Horst, I'll take a closer look tomorrow. I just noticed the same thing happening here once, but when I try to repeat after restarting it's fine. Of course that makes it harder to troubleshoot. Thanks. I'll get back.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Toolbar Cycle and Management

Post by klownboy »

Hi Horst, I sent you an advance copy of Toolbar Cycle and Management version 1.03 via PM on June 1 for you to check out since you reported an issue. I'm not sure if you received it or not. I say that because I looked in my PM Outbox and it was there and indicates sent but I don't see it in my Sent folder. So I'm actually not sure it was sent out. Could you check to see it if it's in your inbox. If not I can resend it. The PM explains the changes. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Toolbar Cycle and Management

Post by Horst »

klownboy wrote: 04 Jun 2021 17:06 Hi Horst, I sent you an advance copy of Toolbar Cycle and Management version 1.03 via PM on June 1 for you to check out since you reported an issue. I'm not sure if you received it or not. I say that because I looked in my PM Outbox and it was there and indicates sent but I don't see it in my Sent folder. So I'm actually not sure it was sent out. Could you check to see it if it's in your inbox. If not I can resend it. The PM explains the changes. Thanks.
Sorry I missed the PM.
EDIT
Sorry I made an error in how to load the script with a CTB.
It works now perfect.
Thanks for your help.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3235)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Toolbar Cycle and Management

Post by klownboy »

Hi Horst, thanks for testing and glad to here it's working for you.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Toolbar Cycle and Management

Post by klownboy »

For version 1.03, I made some changes in the logic such that if there are only 2 saved toolbars (i.e., two toolbar TXT files that exist in "<xydata>\toolbar" folder), the script will not prompt you to select 2 from the right click menu. If you only have one you'll get prompted to create another one or if you have more than 2 saved you will be asked to select 2 if you haven't already.

The script is now saving the existing configuration to a temp file such that we are assured of getting the most current toolbar when saving the "current" toolbar.

Added some additional flow control and error checking.

Thanks to Horst for testing.

As in the previous update to invoke:
CTB:
- on left click - load "<xyscripts>\ToolbarCycle.xys";
- on right click - load "<xyscripts>\ToolbarCycle.xys";
UDC:
- Category - Load script file: - <xyscripts>\ToolbarCycle.xys - Assign keyboard shortcut - Numpad 5 (or whatever, but with no modifier)
- Category - Load script file: - <xyscripts>\ToolbarCycle.xys - Assign keyboard shortcut - Control Numpad 5 (or whatever, but with a modifier.)

Thanks for trying. Please let me know of any issues.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply