Drive Toolbar Auto Hide on Folder Tree

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

How to use buttons and scripts from this forum

2 Likes