Problems to synchronise actions/display on local listers

Alright, I'm here again for a little problems on local listers.
All the code below is what is in place at the moment after a lot of tries without having work the way I would really like.

I set up a button to toggle the current (local) lister into flat view with this code:

Toolbar NAME="xx - Flat View" TOGGLE LOCAL Set VIEW=Details Set FLATVIEW=Grouped Set CHECKBOXMODE=On

This displays a toolbar and set up the current pane into grouped flat view.

My first question: is it possible to turn the whole current local lister in flat view?
I guess so... With some more command lines to set the source as active, turning it into flat view, then setting the dest as active and performing the same actions... but is there a kind of shortcut command to that? :wink: And otherwise, is there a like "if","for","goto" kind of commands to help in DOpus commands? (let me guess, VB once again hehe :wink:)

More seriously, this is also a button I created on the FlatView toolbar to close it and go back into normal display:

Toolbar NAME=*this CLOSE LOCAL Set FLATVIEW=Off Set CHECKBOXMODE=Off

From this button, when I want to go back to normal, it works fine (if the active lister is the one which displays flat view, that's why i was asking my 1st question, so this problem would go as closing would set also everything back to normal)

Also, I didn't toggled flatview modes in my buttons because I only want grouped mode with checkboxes as default. I would like to be able through these 2 buttons to set and unset this mode (with the slight difference in the first button that it's a toggle button which displays the state of the toolbar). 2nd question: Is there a way to synchronise all this locally for the whole lister (maybe not tabs in both listers, but at least the two panes)?

And last question: is there a way to remember the display config of the folder before getting into flatview mode so it can be restored after leaving flatview, or set it back to default filetype recognition?

Thanks a lot in advance

[/code]

I made new searches also with the Dopus manual, and I noticed I can make both panes flat view with that before turning into flat view:

Set STATE=lockoff

[quote]

Set STATE=lockoff [/quote]

oops, doesn't seem to work[/quote]

Nobody has an idea? :cry:

At the moment, there's no conditional logic in Opus commands. You have to use external scripts to do that.

You can switch the source/dest using Set SOURCE=Toggle and then run another set of commands on the other side of the lister. The trick is that the other set of commands have to be launched separately, since any that run in the context of the same button will still consider the original source to be the source. You can work around that by using dopusrt to queue up commands as if they were launched separately. However, at the moment there seems to be a problem with using dopusrt that way so you might want to wait.

I'd say using a layout or style would be better for what you're trying to do. Those can set everything to flat view (etc.) and inherit the current source & dest folders.

I already have a layout created for some FTPs displaying things this way, but this button and toolbar is more for a use on a single lister sometimes, to be accessed more quickly.

I toggled source and dest to be able to get everything into flatview and I'll use only the toolbar button to get back to normal display. I'll probably remove this button if it causes me some problems.

Thanks for the help

Use a Style instead of a Layout if you want it to affect the current/single lister.

That's right, I don't use much styles, mostly to switch between 1 & 2 panes...
I didn't thought that much about it!

Thanks for the tip!