Hi all,
Topic MiniTree: Vanilla XY only gives you the option to expand the destination node (current path) in the tree if you manually click on it in the tree. By other navigation means the tree normally syncs but the dest node does not expand, if it is collapsed. And even then, it is not sure that all the subfolders are expanded, since it is the MiniTree. Also, the auto-optimization only works if you expand a node in the tree, which means you must click on it in the tree, but again, not if the folder you are navigating to is already expanded. For some, maybe even for the most (?), this may work and suit their work-flow. But somehow it's hard for me to fully get used to it.
Therefore, I made 2 AHK-scripts for a more customizable auto-optimization (expanding and collapsing) of the minitree. One very simple and one more complex script. (They are still under development and need YOUR help to reach their full potential.
In both versions I check XY (with AHK) every 150 ms for a folder change. It is not noticealbe to me as far a CPU usage. But it does mean that this extra script needs to run continuosly in the background apart from XY. Of course since it is AHK, AHK needs to be installed or else, for the brave ones, I also provide a compiled exe in the download besides the code (because of a user wish
The simple version will only expand the destination node in the MiniTree, regardless of how one navigates there. This version is called "XYplorer_MiniTreeExpandDestination". (It does not depend on an ini file as does the other version.)
The more complex version is called "XYplorer_MiniTreeBrowsing". It works like this:
If folder change occured it collects the folders I want to display in minitree and updates the minitree by way of "loadtree".
In effect, this means that the whole current minitree is deleted and replaced by the following folders.
The script collects:
now current folder (must be first entry of course)
favorite mini tree folders (read out of the XYplorer.ini file)
all direct (not recursive) sub-folders of the current folder -> This can be turned on/off in a seperat ini file (details in the ini incl. in download).
all sibling folders of the current folder (up to a max. count, defined in the ini file; if the count of folders would be higher than defined maximum, then no siblings are displayed at all; setting it to 0 turns it completely off; setting it to nothing turns it completely on. One can also define parent-paths in the ini who's children should never be displayed as siblings.)
certain paths that are calculated dynamically based on path groups (for more detail see the ini-file or this post: http://www.xyplorer.com/xyfc/viewtopic. ... 45#p112381)
The collection of all these folders and the loading by way of "loadtree" happens so fast that it feels almost natural. I have an Intel Core i5 650@3.20GHz and 4GB RAM. Most folders I access are on the company network. I do not know the specs of the network/server. But as said, everything is very fast.
MiniTree of course needs to be turned on. Else, with normal tree, the script has no effect at all. I did not test all XY-Settings in connection with this script, though.
The script works with an ini file (as mentioned), which must be named "XYplorer_MiniTreeBrowsing.ini".
The default ini file is included in the download.
The ini needs to be located in the xydata path. (Format based on SkyFrontier's suggestion
You can put it in the XYplorer-data-path manually. Else, if it is not there the script tries to create it automatically on the first run of the exe.
Hint:
For an "optimized" MiniTree-browsing experience in connection with this script you might want to try turning OFF "Expand dest node in tree", "Expand tree nodes on sgl click" and "auto-optimize tree" (Tools menu/Configuragtion.../General/Tree and List/Tree). It might also be influenced by "Lock Tree" (View menu). Maybe you will notice a difference and maybe not.
Feedback welcome, thx!
Newest version can be downloaded "always" from here:
!!!! USAGE AT EVERYONE'S OWN RISK !!!!!!!! some previous versions: Change-Log:
XYplorer_MiniTreeExpandDestination:
v0.003: improved the handling of differentiating btw. navigating "upwards" in path and collapsing a super-node of the current path (which also results in an "upward"-navigation but in which case the node obviously is not desired to be reopened immediately)
v0.002:
added a work around for making mouse down blowup work again in connection with this script
added work-around for cycling through tabs with a KS including the SHIFT-key (loadtree would trigger a new tab together with SHIFT); now the script waits until SHIFT is released
XYplorer_MiniTreeBrowsing:
v0.013:
added ignorance for search results (sometimes it could have come to interferences)
added a version check; XY must be at least "14.50.0107" (needed for ignoring search results)
v0.012:
new ini-file
added a switch in the ini-file to toggle the termination behaviour of the script (details in the ini-file)
changed the meaning of the value of showDirectSubfolders slightly (in order to be more logical); now: 0 or blank means no. Everything else means yes.
introduced path groups (for more detail see the ini-file or this post: http://www.xyplorer.com/xyfc/viewtopic. ... 45#p112381)
v0.011: added ignorance for paper folders (before paper folder caused a problem, since they are not visible in the tree)
v0.010: improved the handling of differentiating btw. navigating "upwards" in path and collapsing a super-node of the current path (which also results in an "upward"-navigation but in which case the node obviously is not desired to be reopened immediately)
v0.009: added a work around for making mouse down blowup work again in connection with this script
v0.008:
changed "refresh" (#1001) to "refresh tree" (#482)
added the script name & versionNr to the XYplorer window title
added check if the new path is a parent to the previous path -> no action if yes (then the tree hopefully does not need any refreshment, but especially clicking the minus-symbol would not work right otherwise)
added work-around for cycling through tabs with a KS including the SHIFT-key (loadtree would trigger a new tab together with SHIFT); now the script waits until SHIFT is released
added limitation of effects to first found XY-instance; script gets terminated if this instance closes
v0.007:
added support for dynamic drives
added a security check, so that the script only takes effect if the MiniTree is turned on manually
added a refresh (#1001;) after loadtree
added an option to the ini file: "showDirectSubfolders" (1 means yes. Everything else means no.)
v0.006:
changed behaviour of maxDisplayedSiblings: in order not to use it (deactivate it) simply do not define any number (leave blank)
corrected a bug with FileAppend writing ini if it was not there
added #SingleInstance force
v0.005: corrected an error popping up when browsing to a drive that is not ready, e.g. empty CD-ROM drives
v0.004: simplified the ini file
XYplorer Beta Club