Dual Lister Focus/Source issue

Hi,

I'm having an odd problem that I need a sanity check on. I primarily use DOpus in dual lister mode and have a toolbar with all my frequently used directories as buttons down the center between the two listers. I have created a simple Three Buttons button that is supposed to open the directory path in either the left lister or right lister corresponding to the mouse button pressed. eg If I press LMB on my Archives button I want DOpus to set the left lister to source and open the D:\Archives folder in the left lister. If I use RMB, it sets the right lister to source and opens in the right.

The instructions I use for the RMB:
Set FOCUS=Right SOURCE=Right
Go D:\ARCHIVES

The problem I am having is that despite my first instruction setting the focus and source to the appropriate lister, the directory path is being opened in the current source lister regardless of the LMB/RMB and then the focus/source is changed to reflect the LMB or RMB. Both instructions seem to be running ok but not in order. Is the running order of instructions sequential or do different commands have priority?

I've included the full code below and would appreciate any help.

<xml> <button> <guid>{518FFEFA-4353-4D55-81E4-3A598194E9BC}</guid> <label>Archives</label> <tip>LMB - Open in Left, RMB - Open in Right</tip> <icon1>47</icon1> <button> <guid>{9215D3DA-3E0B-4C3D-8CAD-BBF207A3E37D}</guid> <label>Archives</label> <tip>Open Archives in Left Lister</tip> <icon1>47</icon1> <function> <instruction>Set FOCUS=Left SOURCE=Left</instruction> <instruction>Go D:\ARCHIVES</instruction> </function> </button> <button> <guid>{518FFEFA-4353-4D55-81E4-3A598194E9BC}</guid> <label>Archives</label> <tip>Open Archives in Right Lister</tip> <icon1>47</icon1> <function> <instruction>Set FOCUS=Right SOURCE=Right</instruction> <instruction>Go D:\ARCHIVES</instruction> </function> </button> </button>

Which file list is "Source" is only evaluated at the start of the function, after which all applicable actions run on the Source list.

You can cheat this system by using dopusrt.exe to effectively execute each line of a button as a compeletely separate function but in this case you don't have to resort to that.

Just use OPENINLEFT and OPENINRIGHT:

Go D:\ARCHIVES OPENINLEFT

Go D:\ARCHIVES OPENINRIGHT

Fantastic!

Thanks a lot for you help and the speed of your response. :smiley: