For the first time a need has arisen to invoke a second button set.
The question is; There are only four buttons on this new button set. How do they get centered? So they are not all on the extreme left?
New to button sets.
-
WirlyWirly
- Posts: 332
- Joined: 21 Oct 2020 23:33
- Location: XY 64-Bit | Win 11 @ 100% (3440x1440)
Re: New to button sets.
There is no "centered" alignment option for button sets, so the best you can do is create "blank" buttons by setting the title to
-------------------------------------------------------
Alternatively, rather than have an entire second row with only 4 buttons, you can use a custom button to create a Hamburger menu (AKA, drop-down\popup menu). From there you can consolidate your buttons.
Simply add a custom button to your toolbar and then edit the
Here's an example of my own Hamburger menu that I use as a replacement for the XY menu bar...
For more advanced Hamburger menus, you can also use separators, such as this Hamburger menu for my most commonly used settings...
The structure is
{spaces} and then enabling the Text button and Unclickable checkbox for them. This will pad the left side until you get your buttons into the position you want them... Though that might not look right after your resize the window...-------------------------------------------------------
Alternatively, rather than have an entire second row with only 4 buttons, you can use a custom button to create a Hamburger menu (AKA, drop-down\popup menu). From there you can consolidate your buttons.
Simply add a custom button to your toolbar and then edit the
On left-click: field with your list of commands, which can be either ID numbers or actual lines of script.Here's an example of my own Hamburger menu that I use as a replacement for the XY menu bar...
Code: Select all
:men_file
:men_edit
:men_view
:men_go
:men_favorites
:men_tags
:men_user
:men_scripting
:men_panes
:men_tabsets
:men_tools
:men_window
:men_helpThe structure is
SEPARATOR>TITLE|COMMAND|ICONCode: Select all
|>Configuration|#600|:conf
|>All Commands|#705
|>Manage User-Defined Commands...|#656|
|>Manage Folder Views...|#477|:fvs
|>Customize Keyboard Shortcuts|#602|:cks
|>Customize File Associations...|#604|:lstmgmt
|>Customize File Icons|#605|:cfi
-
|>Load Script File|#10|:steps
|>Run Script|#9|:steps
|>Permanent Variables|#756|:steps
-
|>Manage Favorite Folders...|#574|:favs
|>Toggle Favorite Folder|#566|
|>Manage Favorite Files...|#575|:favfiles
|>Toggle Favorite Files|#565|
-
|>Save Configuration|#193|
|>Save Settings|#182|:savedirty
-
DixieCup48
- Posts: 117
- Joined: 30 Jan 2018 14:58
Re: New to button sets.
Thank you. That was indeed an exemplary dissertation that you put together. It will take some time to assimilate all that code and information!
If I were still grading papers yours definitely rises to the level of an A.
If I were still grading papers yours definitely rises to the level of an A.
-
hermhart
- Posts: 255
- Joined: 13 Jan 2015 18:41
Re: New to button sets.
Is there a way in this that you can load your own script files with this hamburger type menu? I've tried a bunch of ways, and I hope that I have just missed something. I'm also trying the popupnested with a HEREDOC.
My goal would be to have a menu.xys that my button points to and then I can have the indented structure and can call my script files. Right now I am using the method below, but it feels cumbersome trying to figure out all the "+1" things.
"Create Directory Structure|<xyicons>\shell32.dll_Icons\shell32.dll_I41a6_0409.ico||+1"
load "Windows_CreateNestedItems";
"|||+1"
"Directory Listing|<xyicons>\DirectoryListPrintLogo.png||+1"
load "Windows_DirectoryListing";
"|||+1"
My goal would be to have a menu.xys that my button points to and then I can have the indented structure and can call my script files. Right now I am using the method below, but it feels cumbersome trying to figure out all the "+1" things.
"Create Directory Structure|<xyicons>\shell32.dll_Icons\shell32.dll_I41a6_0409.ico||+1"
load "Windows_CreateNestedItems";
"|||+1"
"Directory Listing|<xyicons>\DirectoryListPrintLogo.png||+1"
load "Windows_DirectoryListing";
"|||+1"
Windows 11 Pro; 100% scaling
-
WirlyWirly
- Posts: 332
- Joined: 21 Oct 2020 23:33
- Location: XY 64-Bit | Win 11 @ 100% (3440x1440)
Re: New to button sets.
I don't fully understand your question, but you can definitely load scripts through a Hamburger menu, either by providing their
Read the help file for a bit more info...
If you want to chain commands through QuickScripting, simply separate them with a
-----------------------------
If the CustomToolbarButton should load a
1) [Recommended] Register the
2) Add a QuickScripting line directly to the button field;
-----------------------------
Using
It's my preferred menu option when doing any kind of complex tasks, such as I did in my 7-ZipXY and ImageMagickConverter scripts, both of which use
Look through those files for examples of
#ID after registering them as a UserDefinedCommand (recommended) or through QuickScripting, which is what we call one-liners that start with :: and can be executed in various locations...|>MyScript (UserDefiniedCommand)|#1234|icon.ico|>MyScript|::load "<xyscripts>/path/to/script.xys";|icon.icoRead the help file for a bit more info...
Code: Select all
Quick Scripting
Quick Scripting means: Scripts, when prefixed with "::" (double-colon), can be executed directly (i.e. quickly) through any interface in XYplorer that can process locations: Address Bar, Go To, Favorites, Catalog etc;, the same as you would do in Multi-LineScripts...|>MyScript|::$name = input("GreeterBot 3000", "What is your name?"); echo "Hello $name";|icon.ico-----------------------------
If the CustomToolbarButton should load a
.xys directly without displaying a Hamburger menu, there are a couple ways to do so...1) [Recommended] Register the
.xys as a UserDefinedCommand in the User > Manage Commands > Load Script File menu and then copy the #ID on the bottom-right of the window. Paste that ID number into the button field; On left-Click: #12342) Add a QuickScripting line directly to the button field;
On left-Click: ::load "C:\path\to\script.xys";-----------------------------
Using
popupnested() instead of Hamburger menus allows you to get more complex with your menus, since you can set variables outside the menu, define\call functions, choose where in XY the menu is displayed, and whatever else you can do with Multi-LineScripts.It's my preferred menu option when doing any kind of complex tasks, such as I did in my 7-ZipXY and ImageMagickConverter scripts, both of which use
popupnested() to display the menu and then QuickScripting to perform the selected command. Both those scripts are fragments of a much larger popupnested() menu I use, but the structure is basically the same throughout.Look through those files for examples of
popupnested(), maybe you'll find some answers.-
klownboy
- Posts: 4480
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440
Re: New to button sets.
Hey WirlyWirly, thanks for the refresher course on hamburger menus. It's been some time since I've updated mine.

-
hermhart
- Posts: 255
- Joined: 13 Jan 2015 18:41
Re: New to button sets.
WirlyWirly, thank you so much for the added explanation. That helped me. For some reason, even though I was reading the manual, I was substituting the "::" with "load" and not doing it as "::load".
Windows 11 Pro; 100% scaling
-
eil
- Posts: 1919
- Joined: 13 Jan 2011 19:44
Re: New to button sets.
Damn! Surely i'm noob and only script simply stuff for myself, but it's been year and i didn't know popupmenu items could have multiple commands between name and icon.!WirlyWirly wrote: ↑13 Nov 2026 18:54 If you want to chain commands through QuickScripting, simply separate them with a;, the same as you would do in Multi-LineScripts...
|>MyScript|::$name = input("GreeterBot 3000", "What is your name?"); echo "Hello $name";|icon.ico
We need "a noob scripters guide" from WirlyWirly.!
Win 7 SP1 x64 100% 1366x768|1900x1080
XYplorer Beta Club