Is there a way to get the script to create the currently-displayed toolbar? You can get the script for a custom toolbar button by right clicking on the clear button. Is there an equivalent for getting the script for the entire toolbar? Because that would pretty super sweet.
Get the script for creating entire current toolbar
-
- Posts: 261
- Joined: 02 Dec 2014 16:49
Get the script for creating entire current toolbar
Windows 8.1, 64-bit
Re: Get the script for creating entire current toolbar
Hi aliteralmind, the SC toolbar() command can return the buttons in the current toolbar as well as change it to other toolbars. Typing "::text toolbar();" in the address bar will give you all your current TB buttons. Take a look at the help for toolbar - type the following in the address bar.With the script "LaycatTools" you can make and save new toolbars and load them from a list. You can save and load Layouts, Columns, and Catalogs as well http://www.xyplorer.com/xyfc/viewtopic. ... ls#p107403 The script itself is a little further on in the thread from where the picture is posted.
There's another script out there that may be more like what you want that provides an executable listing of all the current CTBs (with their icons) called EditUserButtons.xys, but can be used to run them with a minor change as well. http://www.xyplorer.com/xyfc/viewtopic. ... ton#p90688 A portion of the listing looks like this... Good luck,
Ken
Code: Select all
rtfm "idh_scripting_comref.htm#idh_sc_toolbar";
There's another script out there that may be more like what you want that provides an executable listing of all the current CTBs (with their icons) called EditUserButtons.xys, but can be used to run them with a minor change as well. http://www.xyplorer.com/xyfc/viewtopic. ... ton#p90688 A portion of the listing looks like this... Good luck,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Get the script for creating entire current toolbar
If you're staying within the same XYplorer.ini then all of what Ken shared will work fine.
If not you'll likely run into the problem of transferring user buttons since I believe all of those solutions rely on the CTBs already being defined and not moved/changed. (Or does LayCatTools handle this, Ken?)
That said it's certainly possible for a script to improve sharing toolbars and CTBs across different installs/XYplorer.inis. The EditUserButton script already contains some code for reading the CTB definitions.
If not you'll likely run into the problem of transferring user buttons since I believe all of those solutions rely on the CTBs already being defined and not moved/changed. (Or does LayCatTools handle this, Ken?)
That said it's certainly possible for a script to improve sharing toolbars and CTBs across different installs/XYplorer.inis. The EditUserButton script already contains some code for reading the CTB definitions.
Re: Get the script for creating entire current toolbar
LayCatTools will simply save the toolbar information (in exactly the same format used in the XYplorer.ini) in a separate txt file. The toolbar txt files are named and can be saved and loaded any time. I wanted to make it as easy as possible by having separate files for each toolbar saved (e.g., normal, default, File Ops etc.). So they'd be handled in the same manner as layouts, columns and catalogs. Since they include the custom buttons, I'm not sure how shareable with others it would be.
I was thinking last night that I'll work on a toolbar script which will utilize portions of your nice script for editing a user button (EditUserButtons) and combine it with some of LayCatTools features such that a user can build toolbars and save them and load them in the same manner as I mentioned, but these different toolbars will be displayed vertically as in the capture above and hopefully not affect the "actual" toolbar in XYplorer. Though as far as building one would probably have to make sure their "normal" toolbar is saved and then modify or make a new toolbar(s), save it with a new name, and reload their "normal" one.
I was thinking last night that I'll work on a toolbar script which will utilize portions of your nice script for editing a user button (EditUserButtons) and combine it with some of LayCatTools features such that a user can build toolbars and save them and load them in the same manner as I mentioned, but these different toolbars will be displayed vertically as in the capture above and hopefully not affect the "actual" toolbar in XYplorer. Though as far as building one would probably have to make sure their "normal" toolbar is saved and then modify or make a new toolbar(s), save it with a new name, and reload their "normal" one.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
-
- Posts: 261
- Joined: 02 Dec 2014 16:49
Re: Get the script for creating entire current toolbar
Code: Select all
:: text toolbar();
Code: Select all
ctb3,ctb1,favfiles,-,-,ctb4,ctb5,ctb6,-,-,mru,hotlist,-,back,up,fore,-,fvs,paper,-,undo,redo,-,newfolder,ctb2,openwith,-,syncbrowse,tsf,views,viewdetails,viewlist,viewthumbs,-,minitree,conf
"AppData/Roaming/XYplorer/Custom TB Buttons/"
directory, and *that* was where the toolbar-creation script read from. Then I could share buttons among toolbars, and update/tweak/move a button without breaking older toolbar-creation scripts.
As someone mentioned, moving or editing a button in the current configuration dialog could potentially break *every* toolbar script.
Windows 8.1, 64-bit