Page 1 of 1

Folder View Settings Script

Posted: 20 Oct 2023 21:05
by hermhart
Is there a way to run a script with Folder View Settings?

I am trying to figure out if I can sort specifically named folders in a certain way and have them scroll to the bottom of the list.

Re: Folder View Settings Script

Posted: 20 Oct 2023 21:24
by jupe
FVS can save sort order, but not scroll to bottom, but you can achieve both tasks via:

Configuration | General | Custom Event Actions >> Changing Locations

Re: Folder View Settings Script

Posted: 20 Oct 2023 21:33
by hermhart
That is a great suggestion. I hadn't thought of that, and will be looking into it. Thank you!

Re: Folder View Settings Script

Posted: 20 Oct 2023 22:36
by hermhart
If you don't mind, I have one more question pertaining to what I found. I have the following script I created and put it in:
Custom Event Actions > Changing Locations > After browsing a folder

Strange thing is, if I put it in the CEA, it runs, but still puts the focus on the file at the top. If I run it as a standalone script, it puts the focus on the file at the bottom like I want. Any ideas on why running the same script is giving me two different results?

Code: Select all

 if (<curfolder> == "Pictures") {
    sortby m, a;
    topindex(b, a);  //scroll to the bottom of the list
    sel -1, , 1;     //select the last item in the list
    sel;             //deselect all
    focus L;
 }

Re: Folder View Settings Script

Posted: 20 Oct 2023 22:59
by jupe
It might work more reliably in "After Painting the file list" event.

PS: topindex wouldn't be necessary when also using sel -1, or you could use it instead of the 2 sel lines depending on your requirements.

Re: Folder View Settings Script

Posted: 20 Oct 2023 23:34
by hermhart
Thank you so much, it worked!

Re: Folder View Settings Script

Posted: 21 Oct 2023 03:06
by RalphM
Is it just me?
Wouldn't it make more sense to "sortby m, d;" and have the top item selected automatically.
My brain must be wired differently as i never understood why the newest item should be at the bottom of any list.

Re: Folder View Settings Script

Posted: 21 Oct 2023 03:44
by hermhart
For the particular folder that I am working with, I just prefer everything to be in that order.