Best Method to Clear Mini-Tree

Discuss and share scripts and script files...
Post Reply
GreetingsFromPoland
Posts: 222
Joined: 29 Sep 2022 14:20

Best Method to Clear Mini-Tree

Post 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);

highend
Posts: 13309
Joined: 06 Feb 2011 00:33

Re: Best Method to Clear Mini-Tree

Post 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;
?
One of my scripts helped you out? Please donate via Paypal

GreetingsFromPoland
Posts: 222
Joined: 29 Sep 2022 14:20

Re: Best Method to Clear Mini-Tree

Post 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;

Post Reply