vTBs or Vertical Toolbars

Discuss and share scripts and script files...
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: vTBs or Vertical Toolbars

Post by TheQwerty »

klownboy wrote:@highend and Sammay, by the way do think it's within Don's power or should I say even possible to have XYplorer recognize whether someone has made a right click versus a left click on a menu item as he was able to do on CTBs. I can see much potential use for that well beyond this script. It would certainly make this script much more powerful. I may make wish at some point after he's recovered and got the next big thing behind him.
It would be rather non-standard for a menu to handle left and right clicks differently. Also, I bet if Don thought it was a good idea to do this he'd have already done so for the toolbar's overflow menu.

What you truly want is an entirely new function which generates a floating toolbar having either a horizontal or vertical orientation, but this brings with it a whole bunch of other problems.

Frankly, I believe a better solution is for your menu showing the buttons to include one item 'Trigger Right-Click Action' which is a script that toggles a variable between having a value of 1 and a value of 2 and then shows the menu again. (Ideally it should also be checked when value is 2.) This variable is then what you pass to the button or userbutton SC to emulate a right-click instead of a left-click.

Yes, this makes right-clicking slightly more difficult as it requires an additional click (though when running your script from a CTB you could pre-click it). However, it retains keyboard navigation, doesn't require any work from Don, and keeps things rather simple without breaking standard menu behavior.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: vTBs or Vertical Toolbars

Post by bdeshi »

klownboy wrote:Hey Sammay, when you say
SammaySarkar wrote:...and it's fixed now.
are you saying the alias worked now along with the other fix?
Yes.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: vTBs or Vertical Toolbars

Post by klownboy »

TheQwerty wrote:...I bet if Don thought it was a good idea to do this he'd have already done so for the toolbar's overflow menu...
Well possibly, but I wasn't just referring to the benefits from this or any other toolbar type script, but thinking of the potential value of this capability in general when scripting menus of any type in XY. (i.e., essentially the built-in capability to accomplish 2 actions with in one menu item).
TheQwerty wrote:'Trigger Right-Click Action' which is a script that toggles a variable between having a value of 1 and a value of 2 and then shows the menu again. (Ideally it should also be checked when value is 2.)
Yeah, I've been thinking of ideas along those lines for the past week, or something similar to what this simple toolbar script offered a couple of years ago.

Code: Select all

"Refresh ->|:refresh : refreshME"   Load("*","_refreshMD;-;_refreshL;_refreshR;_refreshD");
"<- Refresh|:refresh|1 : _refreshMD"   Load("*");
"&Left Click|:refresh : _refreshL"   Button("refresh", 1);
"&Right Click|:refresh : _refreshR"   Button("refresh", 2);
In the end though with either method, whether it's up front where you specify the type click or after the initial click that you specify it, it's still an additional click taking too long to do something which should be quick. Honestly, I wasn't going to bother doing this script initially because of that fact. I didn't want to make the script dependent on whether the user assigned it to a CTB as far as detecting the click. I think there much potential value in being able to detect the type click in a menu item far beyond these toolbar scripts, and Don, provided it's possible, wouldn't necessary kibosh a good idea because of the work involved. And yes, it would have to done in a way that wouldn't interfere with existing behavior. :wink: :whistle:
Thanks,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: vTBs or Vertical Toolbars

Post by bdeshi »

instead of multiple triggers on menuitems, it might be easier and simpler (for Don too) to check if a modifier key is pressed and trigger different actions. say hold SHIFT and pick menu for rightclick.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: vTBs or Vertical Toolbars

Post by nerdweed »

SammaySarkar wrote:instead of multiple triggers on menuitems, it might be easier and simpler (for Don too) to check if a modifier key is pressed and trigger different actions. say hold SHIFT and pick menu for rightclick.

Almost a year, I requested this - http://www.xyplorer.com/xyfc/viewtopic. ... 10#p103468 :ninja:

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

Re: vTBs or Vertical Toolbars

Post by klownboy »

SammaySarkar wrote:to check if a modifier key is pressed and trigger different actions. say hold SHIFT and pick menu for rightclick
Hi Sammay and nerdweed, yes a modifier key like control, alt, or shift would be very welcome especially if it was easier for Don to program a modifier key detection then a right click. It would certainly bring a substantial increase in potential power for every menu item.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: vTBs or Vertical Toolbars

Post by klownboy »

Version 1.03 of Vertical Toolbar [vTB] issued. Please see the first post. Changes since v1.02 include:
- The vToolbars no longer display the internal icon names only the descriptive name of the toolbar buttons. Good suggestion highend. Besides being unneeded, think its cleans up the menu a bit and depending on your largest width button title, it can lead to narrower displays.

- Added the option in the inputselect when generating a new vToolbar for re-ordering the buttons which will display. It works quite nicely - remember besides drag and drop you can also use control with the up and down arrows. Hopefully this will help out as far as ordering highend.

- Cleaned up the menu display a bit to make it narrower which can also lead to overall narrower vTB displays depending on the length of your largest button title of course.

- Incorporated a check downstrean of the vToolbar folder existence check to ensure you have a vToolbar text file in that folder. Though it shouldn't happen, this would have been a problem if the folder existed and you had no vToolbars in it.

Thanks,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

kodyman
Posts: 222
Joined: 09 Apr 2011 04:05

Re: vTBs or Vertical Toolbars

Post by kodyman »

klownboy

Thanks for the work you've done to create vTBs. I like how this can un-clutter my main toolbar of buttons not used frequently but still having them accessible quickly with a CTB.

I've picked up a few things over time but I'm not a scripter. One thing I have tried but can't figure out how to do. Or if it's possible with vTB.

I have created two vTB toolbars. vtb_bar_1 and vtb_bar_2 (txt files). I'd like to be able to assign each to a separate CTB. Or have a CTB that only pops up a list of my created vtb_bar... files to select from on first run.
Or, just thinking, how could I move create toolbar, load toolbar, delete toolbar from the bottom of the selection pop-up to the top of the list? This could allow me to load a new toolbar quicker than scrolling to the bottom of a long last used list.

Hope this makes sense and thanks again for your submissions.

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

Re: vTBs or Vertical Toolbars

Post by klownboy »

kodyman wrote:I have created two vTB toolbars. vtb_bar_1 and vtb_bar_2 (txt files). I'd like to be able to assign each to a separate CTB.
Hi kodyman, I can see why that might be useful to simply have 2 separate vTBs that you could use in the way you suggest rather than one vTB which has the capability of loading different ones as it currently does. You could also consider one vTB being called with a left click of a CTB and the other vTB brought up by a right click of the same CTB so you're not using up 2 CTBs. The original script could still be used when you want to develop a new vTB or replace one of your original vTBs. I'll have to dig into it further, but I don't think I'd want to modify or mess with the original script though. I'd probably want to develop a new script that calls an already saved vTB(s). It's a holiday weekend here so I may not get to it for a couple of days.
kodyman wrote:Or, just thinking, how could I move create toolbar, load toolbar, delete toolbar from the bottom of the selection pop-up to the top of the list? This could allow me to load a new toolbar quicker than scrolling to the bottom of a long last used list.
I can look at this as well, but right now I'm thinking if you had the above capability this would probably not be necessary.

Thanks for the comments and suggestions,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

kodyman
Posts: 222
Joined: 09 Apr 2011 04:05

Re: vTBs or Vertical Toolbars

Post by kodyman »

There's absolutely no rush. I'm probably on the same holiday here in the U.S.
Plus after re-reading my own post I need to clarify my thoughts on what I'm trying to do. Maybe there's a way in addition to vTB to accomplish it.

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

Re: vTBs or Vertical Toolbars

Post by klownboy »

Actually I ended up getting some time today and worked up a change. I was able to modify the existing script such that it can be used as it currently is or it can be used as you described. I have to give it some more testing before I upload (maybe tomorrow), but by changing the left click or right click entry for the CTB like this...

Code: Select all

Global $vTB="Rogers_vTB"; load "<xyscripts>\vTB_v1.04.xys";
you'll be able to specify a particular vertical toolbar. The "Rogers_vTB.txt" file will have to be located in the vToolbars folder off the XYplorer folder. If you like the right click of the same CTB could be assigned the normal vTB script with "load "<xyscripts>\vTB_v1.04.xys" or it could be assigned a different specific toolbar as above. I think this will be a nice addition to the script. Thanks for the suggestion.

I'm not sure what else you had in mind, but in case you didn't know it, there are other scripts out there like this link http://www.xyplorer.com/xyfc/viewtopic. ... ls#p107403 where you can very quickly and seamlessly change the actual XY toolbar as well. The script itself is located in this post http://www.xyplorer.com/xyfc/viewtopic. ... 15#p107639
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

kodyman
Posts: 222
Joined: 09 Apr 2011 04:05

Re: vTBs or Vertical Toolbars

Post by kodyman »

I'll keep an eye out for updates to vTB.

Thanks for pointing out the other scripts. LayCat is perfect for allowing me to quickly select one of the 3 catalogs I've created for different circumstances. Thanks to Filehero for putting it together. It's doing similar with the catalog dat files to what I was trying with vTB; quickly select one of the toolbars I created with vTB.

The more I think about it, what I am looking to do is have something along the line between the menu and my long toolbar arrangement.
Currently I have 46 buttons on the standard toolbar, broken into 8 groups using single or double separator bars. Depending on the width of my main XY window at the time, any number of these are only accessible with the >>More dropdown. When using the >>More dropdown is when I thought it would be handy if I could somehow convert the buttons in my 8 categories to individual CTB's. This is why I asked whether there was a way to assign each of the lists (txt files) created with vTB to a separate CTB.

Hope I better explained by thoughts this time. Looking forward to trying your change above when it's worked out. Also need to see what I can do with your LayCat Tools.

Thanks again!

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

Re: vTBs or Vertical Toolbars

Post by klownboy »

Hi kodyman, for your particular situation as far as what you'd like to do with your XY toolbar breakup, you could go a couple of ways. You could make up 8 different toolbars to simulate each of your current sections. That could be done with LayCatTools (or a similar but more simplified script) naming each of the 8 toolbars appropriately, but each of the toolbars would have to have the CTB that calls the script so you can change them at will or you could have a Customized Keyboard Shortcut or User Defined Command to bring up the script or a toolbar selection menu. There are some toolbar manager scripts out there that will simply work on toolbars and not the other stuff such that when you clicked on the CTB the list of toolbars would come up immediately in lieu of going through another menu. Another option would be to use the vertical toolbar script to have 8 different vTBs defined and they could be brought up in a number of ways. I'll be uploading the next version, hopefully later today, which would let you do that.

Both options would be quite easy to set up once you have the toolbar text files defined. The text files for each toolbar from LayCatTools and vTB would be interchangeable as well for use with either method/script.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Irwin of Upton
Posts: 131
Joined: 28 Feb 2015 19:42

Re: vTBs or Vertical Toolbars

Post by Irwin of Upton »

Am interested in trying this very clever modification. But before doing so could one of the contributors furnish some screen shots? Want to avoid "buyers remorse".

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

Re: vTBs or Vertical Toolbars

Post by klownboy »

Hi, I posted vTB Version 1.04 (see 1st post). Changes since v1.03 include:
1) You can now load a specific vTB directly by using a load line like this:

Code: Select all

Global $vTB="Daffys_vTB"; load "<xyscripts>\vTB_v1.04.xys";
Please specify the vTB in the variable without the txt extension. You could have one CTB calling a specific vTB and another calling a different one. Or, you could set up a CTB such that the left click pulls up one vTB and right click a different one. Thanks kodyman for the idea. You can use any previously saved vTB text file saved in the vToolbar folder of XYplorer and obviously you can still generate new vertical toolbars as you'd like.
If you'd rather keep using it in a manner similar to the old version 1.03, you can still do so by simply using load "<xyscripts>\vTB_v1.04.xys"; in the left or right click CTB menu or elsewhere.

If you also use the LayCatTools script here, you could also use those toolbars (located in the Toolbars folder off XYplorer folder). They are fully compatible and interchangeable with the vTBs. However, some of those may be a little long since they're since they're used horizontally in lieu of vertically.

2) I've added an option also which allows you to either show or not show the AddOnMenu which has the Generate/Load/Delete addon menu items on the end of the vTB menu. If you're all set and don't mess with the vTB menu items frequently or the menu is too long, set the variable $ShowMenuAddon to "0" in the "_Initialize" section. If you want to see the AddOnMenu, keep the variable set as the default of "1".
3) Under certain circumstances, SC replacelist was not working as I expected when there were repetitious words like 'copy'. This resulted in "Copy path" not being pre-checked as a current user buttons list when generating a new vTB as well as some other odd results. Per Sammay's suggestion, I ended having to use gettoken/gettokenindex as a replacement.

At some point I'm thinking about breaking out the toolbar portion of the LayCatTools menu mentioned above such that it only deals with toolbars for quicker accessibility to change either XY's normal toolbars or Vertical Toolbars.

Please let me know if you have any issues. Thanks.
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply