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: 22
Joined: 22 Feb 2018 22:11

Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 » 30 Nov 2018 16:14

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: 8247
Joined: 06 Feb 2011 00:33

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by highend » 30 Nov 2018 17:13

Highlighted by what, labels?
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 » 30 Nov 2018 19:27

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

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by highend » 30 Nov 2018 19:49

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 or highend (at) web (dot) de

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 » 30 Nov 2018 20:45

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: 8247
Joined: 06 Feb 2011 00:33

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by highend » 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;
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 » 01 Dec 2018 14:40

Wow this is perfect! Thank you so much.

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 » 28 Dec 2018 21:24

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: 8247
Joined: 06 Feb 2011 00:33

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by highend » 28 Dec 2018 21:41

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 or highend (at) web (dot) de

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

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 » 11 Jan 2019 21:24

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: 22
Joined: 22 Feb 2018 22:11

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by tom_01 » 24 Apr 2019 23:44

Any advice?

admin
Site Admin
Posts: 47432
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Tree Highlighting - Text Color and Reveal Folders?

Post by admin » 13 Sep 2019 10:24

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

Post Reply