// Called by Directory Opus to initialize the script function OnInit(initData) { initData.name = "Fix Lister Z-Order"; initData.version = "1.0"; initData.copyright = "(c) 2019 Leo Davidson"; initData.url = "https://resource.dopus.com/t/opus-behind-other-windows-after-desktop-double-click/31826"; initData.desc = "Make new listers temporarily 'on-top' when opened to work around z-order issues caused by other software"; initData.default_enable = true; initData.min_version = "12.12"; } // Called when a new Lister is opened function OnOpenLister(openListerData) { if (!openListerData.after) return true; // Call us again after the tabs are open. var cmd = DOpus.Create.Command(); cmd.SetSourceTab(openListerData.lister.activetab); cmd.RunCommand('Set LISTERCMD=ontopon'); cmd.RunCommand('Set LISTERCMD=ontopoff'); }