// Simple Tab Labels // (c) 2017 Leo Davidson // This is a script for Directory Opus. // See http://www.gpsoft.com.au/DScripts/redirect.asp?page=scripts for development information. // Called by Directory Opus to initialize the script function OnInit(initData) { initData.name = "Simple Tab Labels"; initData.version = "1.0"; initData.copyright = "(c) 2017 Leo Davidson"; initData.url = "https://resource.dopus.com/t/how-to-add-full-path-to-footer/26324/7"; initData.desc = "Set new tabs to use a custom label/template"; initData.default_enable = true; initData.min_version = "12.6"; initData.config.TabLabel = "%P"; // List of codes at https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Tabs.htm initData.config_desc = DOpus.Create.Map("TabLabel", "Tab label/template to use for new tabs when created.") } // Called when a new tab is opened function OnOpenTab(openTabData) { var cmd = DOpus.Create.Command(); cmd.SetSourceTab(openTabData.tab); cmd.RunCommand("Go TABNAME=\"" + Script.config.TabLabel + "\""); }