GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Open new tabs in destination when source is locked

This simple script opens new tabs in the destination when a folder or archive is clicked in a locked tab.

Normally when a Tab is locked double clicking on a folder or archive will open that path in a new source tab. You can override this by holding down crtl.

Adding this script will change this functionality. If the Lister is in dual display mode and the Tab is locked double clicking a folder or archive will open a new destination Tab.

function OnDoubleClick(doubleClickData)
{
  if(doubleClickData.Tab.lock == "on" && doubleClickData.Tab.lister.dual != 0 && 
    doubleClickData.mouse == "left" &&  !doubleClickData.multiple && 
    doubleClickData.qualifiers == "none")
  {
    if(DOpus.FSUtil.GetType(doubleClickData.item) == "dir")
    {
      return "Go " + doubleClickData.item + " NEWTAB OPENINDEST";
    }
  }
}

OpenNewTabInDestinationWhenLocked.js.txt (1.1 KB)

Was discussed here Open folder in destination when tab is locked

1 Like