Page 2 of 3

Re: MiniTreeSwitcher

Posted: 20 Jan 2026 21:37
by Lusayalumino
Hi HighEnd: Thanks again for another great tool. Mini Tree Switcher has become core to my workflow.

Question: is there a way to load one of the saved / named Mini Trees from another script by name?

I’d love to be able to call something like:
LoadTreeSwitcher"minitreename"

Re: MiniTreeSwitcher

Posted: 21 Jan 2026 05:22
by highend
Test version!

Code: Select all

v0.4
 • Added: Load mini tree from a different MiniTreeSwitcher script file
MiniTreeSwitcher_v0.4.xys
(11.66 KiB) Downloaded 17 times

Re: MiniTreeSwitcher

Posted: 21 Jan 2026 16:29
by eil
Slight Offtopic, but since i myself use couple "self-modifying scripts", wanna share a trick i use to store some parameters inside.

Code: Select all

	/*
	[LastBackup]
	date=2026-01-19 13:44
	*/
Store data in commented INI section:
+ doesn't interfere with script;
+ allows to easily load/save via XY's getkey/setkey;
+ no need to rewrite file or use regex for internal search of data section.

Re: MiniTreeSwitcher

Posted: 21 Jan 2026 17:36
by admin
Slick!

Re: MiniTreeSwitcher

Posted: 21 Jan 2026 18:20
by klownboy
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", ); }

Hi eil, :tup: the use of a comment section in a script is a great way to store ini type information within the self-modifying script. There are some users that don't like that technique, but I think it's fine, both very fast and simple. I've used it on a few scripts posted here, one was 2FavFiles2favFolders.xys where 2 separate favorite folders and favorite files are maintained within the script. viewtopic.php?t=25956

Re: MiniTreeSwitcher

Posted: 21 Jan 2026 20:36
by Lusayalumino
highend wrote: 21 Jan 2026 05:22 Test version!

Code: Select all

v0.4
 • Added: Load mini tree from a different MiniTreeSwitcher script file
MiniTreeSwitcher_v0.4.xys
Dang! You're a machine HighEnd.

So I'm feelin' a tad intimidated. Just replace with the new script and my old toolbars / named mini trees should still work? Or need to rebuild?

And then... how to call these named mini trees up in other scripts?

Sorry I need so much hand holding. 🤣🤪

Re: MiniTreeSwitcher

Posted: 21 Jan 2026 22:32
by highend
You would need to copy your existing entries into the new script
And loading from the external file? There is a new menu point for that...

I'll release a new version probably tomorrow.
Rewritten, external config file, easier to upgrade on changes...

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 12:02
by highend
@Ken
I didn't implement your stuff into the rewritten source.
It's bound to a button in your case and the script should be executable regardless of that

@All
Here is the rewritten v0.5 version of the tree switcher and v0.1 of the converter script
v0.5 is way more manageable, extendable and implements an import function as well.
The config is not part of the script anymore but outsourced to a .cfg file with the same base name of the script

To be able to use your old saved trees, use the converter script!
It will ask for the your mini tree switcher .xys script file and outputs a .cfg file with the same name, only containing the necessary info

You can then import such a .cfg file when running v0.5 with the "Import mini tree(s) from file" menu item...
Importing items doesn't load any of such trees immediately, you have to run the script again to see the imported items

Report any bugs or wishes here!
I'll change the initial post once everything runs smoothly^^
MiniTreeSwitcher_v0.5.xys
(5.84 KiB) Downloaded 5 times
MiniTreeConverter_v0.1.xys
(1.38 KiB) Downloaded 3 times

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 15:11
by klownboy
Thanks again highend for the update. This new one is a function extravaganza! :tup: :kidding:
I noticed when I'm in the full tree, only the one menu item comes up. Stepping through the script, it's occurs at the following:

Code: Select all

    if (get("#489")) {
    ...
    } else {
        $menu = <<<>>>
            Toggle mini / maxi tree|toggle_tree|:cucopy
  ...
Why shouldn't I be able to see the full menu which would includes my mini trees so I could switch to them if I wanted even when I'm in maxitree unless I'm missing something obvious. By your script the full menu only is displayed only if I'm already in a mini tree.

Also, when going from maxi to mini tree the icon should change to the ":minitree" icon. I thought it did previously. I haven't made any changes to it...just so you know though I may that right click change I had before.

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 15:23
by highend
Done on purpose and one of the reasons I'm not updating the first post yet

The thing is: I don't want people to accidentally e.g. save a mini tree while they are in max tree currently...
What about this instead: Provide the full menu minus "Save current mini tree|save_tree|:savesett"?
Also, when going from maxi to mini tree the icon should change to the ":minitree" icon.
Which icon do you mean exactly?

Try v0.5.1 for the changed menu on min / max tree
MiniTreeSwitcher_v0.5.1.xys
(5.84 KiB) Downloaded 7 times

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 15:58
by klownboy
highend wrote: 22 Jan 2026 15:23 Provide the full menu minus "Save current mini tree|save_tree|:savesett"?
That works for me (as seen on v0.5.1).

The XY built-in :minitree icon is just a smaller tree with the upper tree portion faded. It's a nice indicator that you're presently in a mini tree vs maxi.

You may want to consider putting in ellipsis, the 3 dots after the menu items like delete and reorder etc. so the user knows he'll be taken to another menu. It's less scary. :)

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 16:03
by highend
The XY built-in :minitree icon is just a smaller tree with the upper tree portion faded. It's a nice indicator that you're presently in a mini tree vs maxi
But where do you see (in the old version) / expect that icon to be seen? Show a screenshot if possible...
You may want to consider putting in ellipsis
Nobody ever complained about missing ellipsis and that script is 12 years old :masked:
Apart from that I think that nobody should be surprised to see a new window when he wants to delete or reorder mini tree items :)

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 17:44
by klownboy
Concerning the minitree icon, I was probably remembering and looking at my own modification to the script that I mentioned a couple of posts ago (i.e., when I right clicked the CTB it would change from the minitree icon to the maxitree icon and visa versa). So your original script never did it. :ninja: It would be pretty easy to add the icon change.

Code: Select all

   if (get("#489")) {ctbstate("1",); ctbicon(":minitree",); }
   else {ctbstate("0",);ctbicon(":maxitree", ); }

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 18:15
by highend
Done...
Ofc the button icon change only happens if called from a button^^
MiniTreeSwitcher_v0.5.2.xys
(6.17 KiB) Downloaded 5 times

Re: MiniTreeSwitcher

Posted: 22 Jan 2026 19:31
by klownboy
Hey again highend, on v0.5.2 I'm not getting any icon change anywhere in the script. It should do it if I select a mini tree from the menu (if not already in another mini tree) or I toggle mini and maxi right? It doesn't look like those icon change steps are called out on their own independent of the toggle mini maxi. Should you have a separate function for only accomplishing the icon change immediately after a menu item is selected / performed. The icon change funcion would be called to check the state of mini / maxi with get ("#489"). It could be called separately from the toggle menu or when selecting a mini tree menu item.