Every file dislplay window should start in detail view

I´ve search a lot because I thought, it must be easy and I´m only blind to see it. But found nothing. How is it possible to show a specific view in the file display when I change the folder . When I change folders the view (details, list, thumbnails etc.) doesn´t change. I want to return to detail view every time I change a folder....

Have you had a look here?

image

Yes, of course. But there I didn´t found a solution. When I open a new lister all is fine, my predefined format is shown. Following is what I want: I change to a folder with images in and change there to thumnail view. When I now change to another folder by using the tree or my own buttons to change to my favourite folders the format in the file display remains - thumbnail view. But I want, that it always switches back to detail view. May be that my english is to bad that I didnt see the solution in your mentioned FAQ. Would you be so kind, if you know where the exact place of the the solution in this FAQ is send me short part of it. Than I can better search for it. Thanks a lot in advance

I see...

I don't think that's part of the settings, but you can have a script add-in handle this.

// Called after a new folder is read in a tab
function OnAfterFolderChange(afterFolderChangeData) {
    var cmd = DOpus.Create().Command();
    cmd.RunCommand('Set VIEW=details');
    // cmd.RunCommand('Set FORMAT=!user');
}

EventAfterFolderChange.js.txt (231 Bytes)

How to

How to use buttons and scripts from this forum

Thank you very much, I will give it a try. Great community here!

This works great!!! I really didn´t know the concept script add-ins before (although using Dopus (and also scripts) since 11 years) . One more time it shows what an amazing tool Dopus is! Thanks a lot once more!

Suggested change: Add cmd.SetSourceTab(afterFolderChangeData.tab); after creating the command object, otherwise it may act on the wrong window/tab when folders change in the background.

Similar to the script here:

1 Like

Yes, I have Pro. Thanks a lot, Leo!

Is there a way to make this script work when Enable Folder Content Type detection is enabled? That is, a way disable the script when the option is on, else I'll have to remember to turn the script off whenever I turn content type detection on. Ideally I could query if the feature is in use and do nothing if it is.

From my brief look into the help, it looks like I'd need a theoretical Set FORMAT=!content or Set CONTENTFORMAT=!detected command, but perhaps there's already an alternate method for what I'm looking to achieve. How I see these two commands working is, if the content type detection preference is enabled, set the detected format, else, set the format Opus normally would with the preference disabled. Essentially, an "always use X format when navigating" that'd disable when the mentioned preference is enabled.

What I have so far:

function OnAfterFolderChange(afterFolderChangeData) {
    var cmd = DOpus.Create().Command();
    cmd.SetSourceTab(afterFolderChangeData.tab);
    cmd.RunCommand('Set FORMAT=!default');
}

At that point it's probably easier to manually revert the format when you want to. There's an option to do so in the Folder menu as well as the right-click menu from the status bar format lock icon. (The same command can be placed on a toolbar button or hotkey for even quicker use.)

1 Like