Tree Highlighting - Text Color and Reveal Folders?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
tom_01
Posts: 26
Joined: 22 Feb 2018 22:11

Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 »

Is it possible to change the text color of a highlighted folder in the tree? I see how to set the highlight color, but haven't found a way to change the color of the text.

And is there a way to reveal (ie expand parent folders down to) highlighted folders in the tree? Highlighting is really helping me quickly navigate complex/long folder structures but if a folder gets collapsed, I can't see them anymore. Can't even find a list of highlighted folders (like managing the Favorites list).

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by highend »

Highlighted by what, labels?
One of my scripts helped you out? Please donate via Paypal

tom_01
Posts: 26
Joined: 22 Feb 2018 22:11

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 »

Not labels. It's under Favorites > Toggle Highlighted Folder

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by highend »

Possible via scripting

Code: Select all

    // Save all settings to a temp .ini file
    $ini = "%TEMP%\~XYplorer_temp.ini";
    savesettings 1, $ini;

    // Get highlighted folder(s)
    $highlighted = formatlist(getsectionlist("HiliteFolder", $ini), "ef", <crlf>, "!count=*");
    if (!$highlighted) { status "No highlighted folder(s) found, aborted!", "8B4513", "stop"; end true; }

    $folders = regexreplace($highlighted, "^(\d+=)(.*?)(>.*?)(?=\r?\n|$)", "$2");
    foreach($folder, $folders, <crlf>, "e") {
        showintree $folder;
    }
    delete 0, 0, $ini;
One of my scripts helped you out? Please donate via Paypal

tom_01
Posts: 26
Joined: 22 Feb 2018 22:11

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 »

Thank you. This is cool. It's working pretty well. It seems to conflict a bit with my mini tree though. When the script expands down to the highlighted folders, it does so with it's own mini-tree, so to speak. If I reset my Mini-tree, then the highlighted folders get collapsed again... Not sure if I'm explaining that well, but I guess I would just like the script to not hide folders so I can control that (which folders get displayed/hidden) with the mini-tree feature myself...

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by highend »

You mean something like this?

Code: Select all

    $miniTree = get("#489");

    // Save all settings to a temp .ini file
    $ini = "%TEMP%\~XYplorer_temp.ini";
    savesettings 1, $ini;

    // Get highlighted folder(s)
    $highlighted = formatlist(getsectionlist("HiliteFolder", $ini), "ef", <crlf>, "!count=*");
    if (!$highlighted) { status "No highlighted folder(s) found, aborted!", "8B4513", "stop"; end true; }

    $folders = regexreplace($highlighted, "^(\d+=)(.*?)(>.*?)(?=\r?\n|$)", "$2");
    foreach($folder, $folders, <crlf>, "e") {
        if ($miniTree) { loadtree $folder, 1; }
        else { showintree $folder; }
    }
    delete 0, 0, $ini;
One of my scripts helped you out? Please donate via Paypal

tom_01
Posts: 26
Joined: 22 Feb 2018 22:11

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 »

Wow this is perfect! Thank you so much.

tom_01
Posts: 26
Joined: 22 Feb 2018 22:11

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 »

highend wrote: 01 Dec 2018 08:57 You mean something like this?

Code: Select all

    $miniTree = get("#489");

    // Save all settings to a temp .ini file
    $ini = "%TEMP%\~XYplorer_temp.ini";
    savesettings 1, $ini;

    // Get highlighted folder(s)
    $highlighted = formatlist(getsectionlist("HiliteFolder", $ini), "ef", <crlf>, "!count=*");
    if (!$highlighted) { status "No highlighted folder(s) found, aborted!", "8B4513", "stop"; end true; }

    $folders = regexreplace($highlighted, "^(\d+=)(.*?)(>.*?)(?=\r?\n|$)", "$2");
    foreach($folder, $folders, <crlf>, "e") {
        if ($miniTree) { loadtree $folder, 1; }
        else { showintree $folder; }
    }
    delete 0, 0, $ini;
Hi highend. This script is actually revealing a folder that is neither highlighted nor a mini tree. It used to be highlighted (or a mini tree--I can't remember) but I unhighlighted it and reset the mini tree. Nevertheless, the script is still revealing this folder in my hierarchy. Any ideas?

Thanks!

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by highend »

Which folder is that?

Comment out the delete... line, run the script, show the
HiliteFolder section from the saved temporary .ini file...
One of my scripts helped you out? Please donate via Paypal

tom_01
Posts: 26
Joined: 22 Feb 2018 22:11

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 »

Thanks--I followed your instructions. It's a folder that's been moved/deleted... Perhaps I didn't un-highlight it before moving/deleting?

tom_01
Posts: 26
Joined: 22 Feb 2018 22:11

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 »

Any advice?

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by admin »

Text Color customizing has been added in the meantime:
viewtopic.php?f=5&t=20580

Post Reply