option explicit ' DisplayDualListerFileOperationsToolbar ' ' This is a script for Directory Opus. ' See https://www.gpsoft.com.au/endpoints/redirect.php?page=scripts for development information. ' Called by Directory Opus to initialize the script Function OnInit(initData) initData.name = "DisplayDualListerFileOperationsToolbar" initData.version = "1.0" initData.copyright = "" ' initData.url = "https://resource.dopus.com/c/buttons-scripts/16" initData.desc = "Shows the Secret-HQ Dual-Lister File Operations Toolbar (Center) between listers when the current lister is in dual-display mode — and hides it when in single-display mode." initData.default_enable = true initData.min_version = "13.0" End Function ' Called when a change to the Lister UI occurs Function OnListerUIChange(listerUIChangeData) ' This will match both "dual" and "duallayout". If InStr(listerUIChangeData.change,"dual") Then DisplayToolbar listerUIChangeData.lister End If End Function Function OnOpenLister(openListerData) DisplayToolbar openListerData.lister End Function Sub DisplayToolbar(lister) Dim cmd Dim line line = "Toolbar NAME=""Secret-HQ Dual-Lister File Operations Toolbar (Center)""" If lister.dual Then line = line & " STATE=center" Else line = line & " CLOSE" End If Set cmd = DOpus.Create.Command() cmd.SetSourceTab lister.activetab DOpus.Output line cmd.RunCommand line End Sub