GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Button for opening saved lister

Hi, i now have Dopus opening a certain lister layout when started. I looked in the manual to figure out, how that could be assigned to a button, something like "open layout=name" or so.

And, if this would be possible, to close the previously used lister. So basically i´d like to make a button for resetting the starting lister while closing the old lister.

(now i have to chose options -> lister layouts -> name & then close the other lister).

Well, there SHOULD be a way to do this... but there seems to be a bug that was supposed to have been resolved that appears to be there still.

I don't know if there is a reason you specifically want to 'close' the current lister... so much as load up a specific layout.; but you SHOULD be able to use a button whichs runs something like:

Prefs LAYOUT=My LAYOUTTHISLISTER

Which if working properly, should simply reset the current lister to the state saved in the layout (named after the = sign, in my case 'my'). But it seems not to be working for me despite it being reported fixed in 9.0.0.7 unless I'm using it wrong.

Other than that there are three other options that might not exactly fit the bill for you:

  1. you could edit your layouts setting to enable the 'close all existing listers' option... but this would then affect ALL listers everytime you loaded this layout.

  2. I'm quite drunk at the moment... so maybe I'm missing something obvious... but I thought maybe there was a command to explicitly close the current lister, after which you could run a Prefs LAYOUT=My type command (which without the LAYOUTTHISLISTER arg mentioned above would normally just start a new lister with the saved layout settings... but leave the current lister open...). But I can't seem to stumble my way into a command that closes just the current lister...?

  3. You could maybe just create a lister 'Style' based on the same settings stored in your saved layout... Styles load up just fine against the current lister. You would then create your button to run a command like Prefs STYLE=My

...I'll report the seemingly persistent LAYOUTTHISLISTER bug... when sober.

LAYOUTCLOSELISTERS is the argument you're searching for in your drunken haze :slight_smile:

Eg, Prefs LAYOUT "My Layout" LAYOUTCLOSELISTERS would close all existing Listers and then load the layout called "My Layout".

Wow... either I'm soooooooo trashed I cannot copy and paste correctly, or LAYOUTCLOSELISTERS also doesn't work with layouts containing multiple tabs.

And who said it was a haze? I prefer to think of it as an alcohol induced time/space distortion...

Skip that... I just modified my layout to use only a single tab and the close arg still leaves the current lister open.

Or..... I'm drunkerer than first suspected.

Ah, sorry, you need to specify LAYOUTCLOSELISTERS=yes.

Not quite sure why it's a /O arg actually, it should be a /K.

Hey steje, ya saving any hooch for the rest of us? :laughing:

If not hoist one for me before it's all gone! lol

[quote="steje"]
2) I'm quite drunk at the moment... so maybe I'm missing something obvious...

...I'll report the seemingly persistent LAYOUTTHISLISTER bug... when sober.[/quote]

hehe, kewl, thx a lot mate, it´s working now. thx to you all!

[quote="jon"]Ah, sorry, you need to specify LAYOUTCLOSELISTERS=yes.

Not quite sure why it's a /O arg actually, it should be a /K.[/quote]

yep, after applying the "=yes" argument it´s now working in the exact way i requested for. good work, thank you!

My Dopus settings & coustomization is getting more & more refined all the time.

Wondering how to make this to work?
do you add this to the buttons function field?

Prefs LAYOUT=My LAYOUTTHISLISTER=yes

I tried to replace My and LAYOUTTHISLISTER (separately) with the listers name, but it didn't work.

What are you aiming to do?

The aim is to have buttons for different layouts in the toolbar, to keep the sidebar clean.
Maybe not the best workflow but would like to test it out.

Try this:

Prefs LAYOUT="My" LAYOUTTHISLISTER=size,pos,paths

(Assuming "My" is the name of your layout.)

As an aside, you would normally use Styles rather than Layouts if you just want to change the current window rather than open one or more new windows.