Page 3 of 4

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 19:33
by Native2904
klownboy wrote: 21 Jan 2026 18:20 Hey highend thanks for the update. I noted a syntax error on the line using SC button. "mintree " has to be quoted at least if syntax checking is on.
"Mini tree context menu|:minitree" button "minitree", 2;

This may be of value to other users, since version 0.2, I added a small hidden script label which simply changes from mini to maxi on a right click so something that simple doesn't require using the menu. My right click in the Edit User Button is: #489; load "<xyscripts>\MiniTreeSwitcher.xys", "_CTB_ICON"; and the added hidden label is:

"_CTB_ICON"; if get("#489") {ctbstate("1",); ctbicon(":minitree",); } else {ctbstate("0",);ctbicon(":maxitree", ); }
Hello, maybe you would like to help me -
I tried to use your button but I don't really understand how it is built.
I get the following error message:



How do I enter this? I looked in the help, but unfortunately without success..



Thank you in advance.

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 20:01
by klownboy
highend's script is up to v0.5.2 now. Let's wait until he looks at my previous post comment before doing anything with your above comment.

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 20:25
by highend
v0.5.3 is up, it should now toggle the custom toolbar button for the script (if one is used) even if the script is triggered by another method
MiniTreeSwitcher_v0.5.3.xys
To get this to work look at the description in the script:

Code: Select all

    // ID of the custom toolbar button used, e.g.: "26" for "ctb26"
    // Set it to "0", if no ctb is used...
    // Hold CTRL while hovering over your ctb to show the ID of the button
    // Default = 0 => No ctb button used
    $tbID = 0;
In my case (my button in the toolbar is "ctb26") I would set it to:
$tbID = 26;

@Ken
v0.5.2 toggled the tree button but only if
01. It was invoked through a ctb
02. The toggle entry was used (not a mini tree entry at the top)

@Native2904
The new script doesn't use labels anymore
You just use this script line to invoke it, the rest is handled internally / via the menu entries of it:

Code: Select all

load "<xyscripts>\Minitree\MiniTreeSwitcher_v0.5.3.xys";

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 21:49
by klownboy
v0.5.2 toggled the tree button but only if
01. It was invoked through a ctb
02. The toggle entry was used (not a mini tree entry at the top)
Well I didn't get a icon change even using the toggle from mini to maxi menu item which kind of surprised me and yes, I was running it from a CTB.

No matter, it's running great now. I'm still going to add back the right click capability to quickly change from mini (the last one used) to maxi. It works doing what I did before (i.e, using a new label as mentioned previously). I'm curious though, is there any way to invoke your function update_tb_btn($viaBtn, $tbID) (using "1" for $viaBtn and my CTB ID 23 for $tbID) on the right click entry in the Edit User Button dialog instead to do the same thing...not a big deal. I'm not aware that I can call out a function from there. I've already changed it by adding the label.

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 22:11
by highend
Doable by using a perm variable...

E.g. for the ctb right click:

Code: Select all

perm $P_Tree_Toggle = 1; load "path to\MiniTreeSwitcher.xys";
And in the script before the $menu definition:

Code: Select all

    perm $P_Tree_Toggle;
    if ($P_Tree_Toggle) {
        $P_Tree_Toggle = 0;
        #489;
        update_tb_btn(1, $tbID);
        end true;
    }
But here is v0.5.4 where I have implemented this feature natively.
You only need the same script line for the right click ctb that you already use for the left click...
MiniTreeSwitcher_v0.5.4.xys

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 00:13
by klownboy
Thanks highend for incorporating the right click. It works fine and saves the user from having do a left click of the CTB and then hit the toggle menu item. I'm going to have to start using mini trees more often now. :)

@ Native290, if you been reading the posts since your last one, you know already that you can now put the same entry for right click that you have for left click
load "<xyscripts>\MiniTreeSwitcher.xys";. The right click will toggle the tree from mini (last one used) to maxi and visa versa.

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 05:28
by Native2904
Thank you for your help.
@Klownboy
But could you give me a hint as to what I did wrong above?
Even if it’s obsolete now.

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 12:04
by klownboy
This was supposed to be entered in the "On right-click" line in the Edit User Button for the CTB:
#489; load "<xyscripts>\MiniTreeSwitcher.xys", "_CTB_ICON";

and the following was to be added to the script (at the very end):

Code: Select all

"_CTB_ICON";
	if get("#489") {ctbstate("1",); ctbicon(":minitree",); }
	else {ctbstate("0",);ctbicon(":maxitree", ); }
It worked in that it toggled the icon when changing from mini to maxi, but it didn't do a status update to the MiniTreeSwitcher.cgf file, which highend added in the more recent versions of the script. From your post, it doesn't look like you did exactly that.

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 13:24
by Native2904
Thank you for your patience, and apologies if my questions were off-context or disrupted the discussion.

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 15:20
by highend
So, everyone's happy now?

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 15:42
by Native2904
@Highend
Of course :beer:

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 15:44
by highend
Thanks for the donation btw (I guess it's yours) :tup:

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 15:45
by Native2904
Ja

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 16:27
by highend
Rewritten the first post and linked the current versions.
If you already have v0.5.4 you don't need to update to v0.5.5, it only got a bit more descriptions added but no functional changes / additions

Re: MiniTreeSwitcher

Posted: 23 Jan 2026 18:37
by klownboy
Hey again highend. I noticed in the cfg file you have an entry for an icon for each mini trees. I haven't looked as to how you obtain that, if at all, since each mini tree icon is blank other than the fav. I did enter an icon for each of my mini trees directly into the cfg file. Initially all the icons I entered in the cfg file displayed properly, but as soon as I performed another operation, like picking another mini tree via the menu, they are all gone except for the fav one (which appears to be the current mini tree). I'm not sure why the icon entries are deleted, but it might be nice if they were maintained/saved in the cfg permanently until the minis is deleted. Or another option would be to grab the folder's default icon as listed in Customized File Icons which would save the user from manually entering icons in the cfg file. Thanks.