Skip to content

Instantly share code, notes, and snippets.

View tablacus's full-sized avatar

Gaku tablacus

View GitHub Profile
@tablacus
tablacus / EnableShellExecuteHooks.js
Created August 4, 2017 14:20
EnableShellExecuteHooks "on" with Tablacus Explorer Add-on Shell execute hook 1.02 or higher.
var ex = { EnableShellExecuteHooks: true, Explorer: true };
OpenNewProcess("addons\\shellexecutehook\\worker.js", ex, false, WINVER >= 0x600 ? "RunAs" : null);
@tablacus
tablacus / RefreshKeepSelected.js
Last active August 8, 2017 14:55
Refresh (Keep selected) - Tablacus Explorer
var FV = GetFolderView(Ctrl, pt);
var Selected = FV.SelectedItems();
FV.Refresh();
if (Selected && Selected.Count) {
for (var i = Selected.Count; i--;) {
FV.SelectItem(Selected.Item(i), SVSI_SELECT);
}
FV.SelectItem(Selected.Item(0), SVSI_SELECT | SVSI_FOCUSED);
}
var FV = GetFolderView(Ctrl, pt);
if (FV) {
var hMenu = api.CreatePopupMenu(), hSubMenu;
var ContextMenu = FV.ViewMenu();
if (ContextMenu) {
ContextMenu.QueryContextMenu(hMenu, 0, 1, 0x7fff, CMF_DEFAULTONLY);
var mii = api.Memory("MENUITEMINFO");
mii.cbSize = mii.Size;
mii.fMask = MIIM_SUBMENU;
for (var i = 0; i < api.GetMenuItemCount(hMenu); i++) {
var FV = GetFolderView(Ctrl, pt);
if (FV) {
var hMenu = api.CreatePopupMenu(), hSubMenu;
var ContextMenu = FV.ViewMenu();
if (ContextMenu) {
ContextMenu.QueryContextMenu(hMenu, 0, 1, 0x7fff, CMF_DEFAULTONLY);
var mii = api.Memory("MENUITEMINFO");
mii.cbSize = mii.Size;
mii.fMask = MIIM_SUBMENU;
for (var i = 0; i < api.GetMenuItemCount(hMenu); i++) {
@tablacus
tablacus / StartupToTray.js
Created August 25, 2017 11:52
Start Tablacus Explorer to System tray. Require "Systray", "Startup settings" - Tablacus Explorer
Addons.TaskTray.CreateIcon();
te.CmdShow = SW_HIDE;
@tablacus
tablacus / DisableShellExecuteHooks.js
Last active August 28, 2017 12:36
EnableShellExecuteHooks "off" with Tablacus Explorer Add-on Shell execute hook 1.02 or higher.
var ex = { EnableShellExecuteHooks: false, Explorer: false };
OpenNewProcess("addons\\shellexecutehook\\worker.js", ex, false, WINVER >= 0x600 ? "RunAs" : null);
@tablacus
tablacus / OpenPrevFolder.js
Created October 18, 2017 13:31
Open previous folder - Tablacus Explorer
var FV = GetFolderView(Ctrl, pt);
var pid1 = FV.FolderItem;
var Items = api.ILGetParent(pid1).GetFolder.Items();
var j = -1;
for (var i = 0; i < Items.Count; i++) {
var pid2 = Items.Item(i);
if (IsFolderEx(pid2)) {
if (api.ILIsEqual(pid1, pid2)) {
if (j >= 0) {
Navigate(Items.Item(j), SBSP_SAMEBROWSER);
@tablacus
tablacus / SwitchTabgroupsNext.js
Last active November 2, 2017 11:06
Switch tab groups next * require "Tabgruops" - Tablacus Explorer
Addons.Tabgroups.Wheel(1);
@tablacus
tablacus / SwitchTabgroupsPrev.js
Created November 2, 2017 11:17
Switch tabgroups previous * Reuire "tabgroups" - Tablacus Explorer
Addons.Tabgroups.Wheel(-1);
@tablacus
tablacus / maximize.js
Created January 11, 2018 12:55
Maximize - Tablacus Explorer
api.ShowWindow(te.hwnd, SW_MAXIMIZE);