Scripting: How to control dest tab after switching to dual?

Does Steje's new DO11: Script to open/close related folder tabs automatically do the kind of thing you were trying to get working? It might contain the technique you need.