Skip to content

Instantly share code, notes, and snippets.

@tablacus
Last active April 23, 2022 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tablacus/dbda77cfe450d071b1dcf652ff0ea62e to your computer and use it in GitHub Desktop.
Save tablacus/dbda77cfe450d071b1dcf652ff0ea62e to your computer and use it in GitHub Desktop.
Open next folder - Tablacus Explorer
const FV = GetFolderView(Ctrl, pt);
const pid1 = FV.FolderItem;
const Items = api.ILGetParent(pid1).GetFolder.Items();
const ar = [];
for (let i = Items.Count; i-- > 0;) {
ar[i] = i;
}
ar.sort(function (a, b) {
return api.CompareIDs(0, Items.Item(a), Items.Item(b));
});
let j = 0;
for (let i = ar.length; i-- > 0;) {
const pid2 = Items.Item(ar[i]);
if (IsFolderEx(pid2)) {
if (api.ILIsEqual(pid1, pid2)) {
if (j) {
Navigate(Items.Item(ar[j]), SBSP_SAMEBROWSER);
}
break;
}
j = i;
}
}
@tablacus
Copy link
Author

image

@tablacus
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment