Skip to content

Instantly share code, notes, and snippets.

View tablacus's full-sized avatar

Gaku tablacus

View GitHub Profile
@tablacus
tablacus / incbadges.js
Last active June 5, 2021 12:18
Increment badges - Tablacus Explorer
const Selected = GetSelectedArray(Ctrl, pt, true).shift();
if (Selected && Selected.Count) {
for (let i = Selected.Count; i-- > 0;) {
const path = Selected.Item(i).Path;
const s = GetNum(Sync.Badge.DB.Get(path)) + 1;
if (s < 6) {
Sync.Badge.Set(path, s);
}
}
}
@tablacus
tablacus / locked.css
Created July 16, 2020 14:09
Locked tab style sheet
.locked {
background-color: #ffff00;
}
@tablacus
tablacus / datecolumntoascending.js
Created July 12, 2020 11:42
Click the date modified column to sort in ascending order
AddEvent("ColumnClick", function (Ctrl, iItem) {
var cColumns = api.CommandLineToArgv(Ctrl.Columns(1));
var s = cColumns[iItem * 2];
if (s == "System.DateModified" && Ctrl.SortColumn(1) !== "System.DateModified" && api.GetKeyState(VK_SHIFT) >= 0) {
Ctrl.SortColumn = "System.DateModified";
return S_OK;
}
});
@tablacus
tablacus / up.js
Created May 23, 2020 14:22
Go up - Tablacus Explorer
FV = GetFolderView(Ctrl, pt);
FV.Navigate(null, SBSP_PARENT);
@tablacus
tablacus / focustreeview.js
Created December 24, 2019 13:46
Focus tree view - Tablacus Explorer
FV.TreeView.Focus();
return S_OK;
@tablacus
tablacus / dropfiles.js
Created December 17, 2019 12:34
WM_DROPFILES - Tablacus Explorer
var Selected = FV.SelectedItems();
if (Selected.Count == 0) {
return;
}
var oExec = wsh.Exec("C:\\bin\\tanzip\\TanZIP.exe");
var hwnd = GethwndFromPid(oExec.ProcessID);
api.PostMessage(hwnd, WM_DROPFILES, Selected .hDrop, 0);
@tablacus
tablacus / switch_list_details.js
Created December 13, 2018 14:07
Switch List and Details - Tablacus Explorer
FV.CurrentViewMode = FV.CurrentViewMode == FVM_LIST ? FVM_DETAILS : FVM_LIST;
var FV = GetFolderView(Ctrl, pt);
FV.IconSize = 19;
@tablacus
tablacus / movetabright.js
Created August 29, 2018 13:51
Move Tab to right - Tablacus Explorer
var TC = te.Ctrl(CTRL_TC);
if (TC && TC.SelectedIndex < TC.Count - 1) {
TC.Move(TC.SelectedIndex, TC.SelectedIndex + 1);
return S_OK;
}
return S_FALSE;
@tablacus
tablacus / movetableft.js
Created August 29, 2018 13:49
Move Tab to left - Tablacus Explorer
var TC = te.Ctrl(CTRL_TC);
if (TC && TC.SelectedIndex > 0) {
TC.Move(TC.SelectedIndex, TC.SelectedIndex - 1);
return S_OK;
}
return S_FALSE;