Close tab or whole lister in one shorcut

Is it possible to make a shortcut that would close active tab (Go Tabclose) or close the whole lister if there's only one tab left and Opus is in single lister mode?

@script vbscript Function OnClick(ByRef clickData) Set cmd = clickData.func.command If clickData.func.sourcetab.lister.tabs.count = 1 Then cmd.RunCommand "CLOSE" Else cmd.RunCommand "Go TABCLOSE" End If End Function

Great, thanks.

Now DOpus works the same way as my web browser, where I don't have to bother whether it's the last tab or not. If I finish working with specific tab or lister, I just close it with Ctrl+W. :slight_smile: