Page 1 of 1

View problem

Posted: 19 Mar 2018 16:28
by JimInWoodstock
There appears to be a problem with the view menu function.
Go to view, views, list - the view changes to the list view and the list view is "checked"
Do it again with the same selection - the view changes to the Details view and the "Details view is checked".

So the bug appears to be that is the "checked" view is clicked, the view changes to the "Details" view.

Re: View problem

Posted: 19 Mar 2018 16:42
by highend
This is actually a feature. It switches back to the last used view when you click the checked item again...

Re: View problem

Posted: 19 Mar 2018 17:03
by JimInWoodstock
Thanks. This is only a problem when scripting. Lets suppose that my current view is "list" on c:\programs". I want a script to always go to a specific drive/folder in list view. When I execute the script, since the last view "list", the new drive/folder comes up in "details" view.

So the actual script is:

"Download-Newer - Decending" ::goto "g:\download-newer"; sortby m; #304

So my current view is "list" on c:\programs" and I execute the script.

Since the current view is "list" and I am using the #304 to change the new view to "list", the view now changes to "details" view.

If there is another way to write the script, I would appreciate the help.

I have around a dozen scripts in the favorites folders to navigate to a specific drive/folder and they all have this same problem.

Re: View problem

Posted: 19 Mar 2018 17:35
by highend
Sure

Code: Select all

get("view")
returns the number for the current view so you can use a ternary or if / else combo to switch to the correct one
E.g.:

Code: Select all

"Download-Newer - Decending" ::goto "g:\download-newer"; sortby m; if (get("view") != 2) { #304; }

Re: View problem

Posted: 19 Mar 2018 17:46
by JimInWoodstock
Thanks,

This fixes the problem nicely.