Force Branch View when Details View is active?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Lusayalumino
Posts: 54
Joined: 13 Aug 2018 07:16
Location: USA

Force Branch View when Details View is active?

Post by Lusayalumino »

This branch view is tremendous; thanks for adding this. :tup: Is there a way to force Branch View (#311) any time Details View (#302) is activated?
XYPlorer, Great Form -- Awesome Function

klownboy
Posts: 3205
Joined: 28 Feb 2012 19:27

Re: Force Branch View when Details View is active?

Post by klownboy »

A one liner script like this will do it if (get("view") == "0") {#311;}, but to make it apply automatically, you would have to set up a Custom Event Action (CEA) in Configuration for "Changing locations". For the "Action" block, pick "Run script" from the drop down and in the "Script" block use what I have above. If you need additional help with that let us know.

Lusayalumino
Posts: 54
Joined: 13 Aug 2018 07:16
Location: USA

Re: Force Branch View when Details View is active?

Post by Lusayalumino »

Thanks so much KlownBoy... my first interaction with CEA's. Here's what I tried:

Configuration > General > Custom Event Actions > Changing Locations > [EVENT ITEM] > Run Script > if (get("view") == "0") {#311;}

I tried each of these [EVENT ITEMS] but none of them switched on Branch View when toggling to Details View:
  • Before Browsing a Folder
    After Browsing a Folder
    After Painting the File List
I also tried putting the script in all 3 of the EVENT ITEMS, but still no joy.

Any thoughts?
XYPlorer, Great Form -- Awesome Function

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

Re: Force Branch View when Details View is active?

Post by highend »

After painting the file list
if (get("view") == "0") { goto "<newpath>? /flat"; }
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Lusayalumino
Posts: 54
Joined: 13 Aug 2018 07:16
Location: USA

Re: Force Branch View when Details View is active?

Post by Lusayalumino »

With respect to "after painting file list" - I tried all these variants, without success:

if (get("view") == "0") { goto "<newpath>? /flat"; }

if (get("view") == "0") { goto "<newpath>? /flat"; #311; }
if (get("view") == "0") { #311; goto "<newpath>? /flat"; }

if (get("view") == "0") { goto "<newpath>? /flat"; } { #311; }
if (get("view") == "0") { #311; } { goto "<newpath>? /flat"; }
XYPlorer, Great Form -- Awesome Function

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

Re: Force Branch View when Details View is active?

Post by highend »

Animation.gif
Animation.gif (593.53 KiB) Viewed 105 times
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Lusayalumino
Posts: 54
Joined: 13 Aug 2018 07:16
Location: USA

Re: Force Branch View when Details View is active?

Post by Lusayalumino »

Interesting; so the script definitely works for you. Whenever I choose View > Details... it doesn't execute the script.
XYPlorer, Great Form -- Awesome Function

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

Re: Force Branch View when Details View is active?

Post by highend »

Em. No^^ This is a change location script. It automatically fires when you enter a folder. There is no internal way to run a script just because you're manually switching a view mode. You'd need e.g. an AutoHotkey script that monitors XYs behaviour and does that...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Lusayalumino
Posts: 54
Joined: 13 Aug 2018 07:16
Location: USA

Re: Force Branch View when Details View is active?

Post by Lusayalumino »

Ahhhh... gotchya. I'll just do a script and bind it to a keyboard shortcut using:

#311; #302;

Every time I run that, it will Toggle between LIST VIEW | DETAILS VIEW with BRANCH VIEW.

Thanks!
XYPlorer, Great Form -- Awesome Function

Lusayalumino
Posts: 54
Joined: 13 Aug 2018 07:16
Location: USA

Re: Force Branch View when Details View is active?

Post by Lusayalumino »

To get it to toggle properly, I had to use this:

Code: Select all

#304; #311;
This is super helpful when doing searches. Thanks Highend & KlownBoy!
XYPlorer, Great Form -- Awesome Function

klownboy
Posts: 3205
Joined: 28 Feb 2012 19:27

Re: Force Branch View when Details View is active?

Post by klownboy »

As highend stated, the CEA for "Changing locations" is only going to work for you when you enter a folder not when switching views. You may want to consider having a saved folder view(s), FVS for those folders you want in detail view (i.e., save the FVS for that folder in detail view). This way when you first enter that particular folder(s), the folder will be in detail view and the CEA script for changing location will also put in branch view and as you mentioned, you could have a customized keyboard shortcut or CTB to cycle the branch view when needed.

You can also script to detect if there is a saved folder view (FVS), for example in "Detail view" and have the script only work for those folders you have a saved folder view in Detail view. get("FVS", folder, "view"); See viewtopic.php?f=7&t=13582&start=75#p158075

Lusayalumino
Posts: 54
Joined: 13 Aug 2018 07:16
Location: USA

Re: Force Branch View when Details View is active?

Post by Lusayalumino »

Thanks klownboy. I feel bad, as I should have given more detail in my opening problem statement. I have a bunch of custom searches created, and generally I want thumbs in the results (my default view is thumbs). But after running some of the searches, I sometimes want to toggle between LIST VIEW and DETAILS VIEW + BRANCH VIEW. I have my favorite views bound to keyboard shortcuts:
  • CTRL+1 = List View (toggles between List View & Details View - this is where I wanted to add Details View + Branch View)
    CTRL+2 = Details with Thumbs
    CTRL+3 = Thumbs 1
    CTRL+4 = Etc, etc
So far, Replacing CTRL+1 with

Code: Select all

#304; #311;
seems to be working, but I haven't tested it very much in real world environment... so we'll see.
XYPlorer, Great Form -- Awesome Function

Post Reply