When I have a zip or other archive my typical workflow is to extract it into a self-named folder.
Often I'll download the archive, open it from my browser, opens in a lister tab. Then I have to go up one level, right click the archive, "Directory opus archives", "Extract to ".
I would really love to shorten this. Ideally a button that I can press while inside the zip which self extracts and then navigates to the resulting folder.
I searched previous posts and found buttons I can use when the zip is highlighted but that will still require navigating back up when I'm inside the zip.
I'm working off of one of Leo's scripts. My current challenge is figuring out whether I'm inside a ZIP for the script.
function OnClick(clickData)
{
var cmd = clickData.func.command;
cmd.AddLine("Copy EXTRACT=sub HERE");
if (clickData.func.sourcetab.selected_files.count > 0)
{
var realPath = clickData.func.sourcetab.selected_files(0).realpath;
var extractPath = DOpus.FSUtil.NewPath(realPath);
if (extractPath.Parent())
{
extractPath.Add(realPath.stem_m);
cmd.AddLine("Go \"" + extractPath + "\"");
}
}
cmd.Run();
}