Page 1 of 1

Best Method to Clear Mini-Tree

Posted: 09 Feb 2023 23:28
by GreetingsFromPoland
hi! i have a script that i use (found on this forum) that "resets" my panes to pre-determined locations, e.g. Pane 1 to C:\Temp and Pane 2 to D:\Temp. this works perfect. currently i am using the mini-tree and i wanted to add in something that would completely clear/reset it so that way after the pane reset runs, all that is shown are the two locations listed above.

i get mixed results with different methods and am looking for a solution.

add this to the top of the reset script, this works; however, it leaves the last location from the first pane in the tree. running it a second time removes it :

Code: Select all

setkey "", "MiniTreePaths", "Settings";
#182;
add this to the top of the reset script, this also works and also leaves the last location from the first pane in the tree :

Code: Select all

loadtree "%recycler%";
tried this at the bottom of the reset script, doesn't really reset anything. full tree history is left :

Code: Select all

#484; // Reset Tree
i have probably tried all variations of entries to fully, 100% reset the tree and then reset my panes and haven't had any luck.
any suggestions ?

here is what i found here to reset my panes (which works great) :

Code: Select all

focus "P1";
seltab;
set $p1loc, "C:\Temp";
tab("relocate", $p1loc);

focus "P2";
seltab;
set $p2loc, "D:\Temp";
tab("relocate", $p2loc);

Re: Best Method to Clear Mini-Tree

Posted: 09 Feb 2023 23:56
by highend

Code: Select all

    $p1loc = "C:\Temp";
    $p2loc = "D:\Temp";

    focus "P1";
    #353;
    tab("relocate", $p1loc);

    focus "P2";
    #353;
    tab("relocate", $p2loc);

    loadtree $p1loc . "|" . $p2loc, 0, 1;
?

Re: Best Method to Clear Mini-Tree

Posted: 10 Feb 2023 03:07
by GreetingsFromPoland
thank you! using your "loadtree" suggestion worked. using the script as posted was giving me a prompt about closing tabs and losing their settings and then closed everything but C:\Temp and D:\Temp. which is what is was supposed to be and i wasn't clear about leaving my existing other tabs alone.

what i ended doing was this and so far, it is working :

Code: Select all

  focus "P1";
  seltab;
  set $p1loc, "C:\Temp";
  tab("relocate", $p1loc);

  focus "P2";
  seltab;
  set $p2loc, "D:\Temp";
  tab("relocate", $p2loc);

  loadtree $p1loc . "|" . $p2loc, 0, 1;