How do I script file selection in the destination of a dual-lister?

I'm trying to find a file in the destination tab of a dual-lister that is based on a file name in the source tab (but that is not identical.)

To do this, I'm reading the file out of the source tab, manipulating it in VBScript using RegEx replace, then trying to do a selection in the destination frame of a dual lister.

Except., I can't figure out how to apply the selection to the destination half of the dual-lister. SELECT always wants to use the source frame.

I've tried various ways of getting SELECT to apply to the other tab, but none of them work.

So far, I've tried every combination of swap and select:

A swap:

cmd.RunCommand("Go TABSWAP")
cmd.RunCommand("Set QUICKFILTER """+ findthis + """")
cmd.RunCommand("Set SOURCE=toggle")

and a select:

cmd.RunCommand("Select """+ findthis + """ MAKEVISIBLE")
cmd.RunCommand("Set QUICKFILTER """+ findthis + """")

Here's my code that executes on right-click-context menu "select matching file in other pane":

Function OnClick(ByRef ClickData)

dim func
set func=ClickData.func
dim cmd
set cmd=func.command
sourcename=func.sourcetab.selected_files(0).name
set oRegExp = New RegExp
oRegExp.Pattern = "(\S*).*"
findthis = oRegExp.Replace(sourcename, "$1*")
cmd.RunCommand("Set SOURCE=toggle")
cmd.RunCommand("Select """+ findthis + """ MAKEVISIBLE")
cmd.RunCommand("Set SOURCE=toggle")

End Function

Thanks.

The Command objects run things against a file display (tab / folder). The one from clickdata.func.command is set up to run commands against the lister's source file display by default.

You can change that via the Command object's SetSourceTab method, passing it another tab. For example, cmd.SetSourceTab(clickdata.func.desttab) will change cmd so that it runs commands against the destination tab.

(From the command object's point of view, the destination tab in the lister will be its source tab.)

Fantastic, I missed that function. Thank you.