Alright, the next step would be a one-way toggle event.
function OnInit(initData) {
initData.name = 'ToggleToolbar';
initData.version = '2024-06-24';
initData.url = 'https://resource.dopus.com/t/drive-toolbar-auto-hide-on-folder-tree/50841';
initData.default_enable = true;
initData.min_version = '12.0';
}
function OnListerUIChange(listerUIChangeData) {
if (listerUIChangeData.change != 'tree') return;
var cmd = DOpus.Create().Command();
var cmdLine = 'Toolbar NAME=Drives' + (cmd.IsSet('Set TREE=on') ? ' CLOSE' : '');
// DOpus.Output(cmdLine);
cmd.RunCommand(cmdLine);
}
Save EventToggleToolbar.js.txt toββββ
%appdata%\GPSoftware\Directory Opus\Script AddIns