Skip to content

Instantly share code, notes, and snippets.

View tablacus's full-sized avatar

Gaku tablacus

View GitHub Profile
@tablacus
tablacus / ttsc.cpp
Last active April 29, 2019 03:11
Use Tablacus Script Control without needing to write anything to registry
// ttsc.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "ttsc.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
@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);
var FV = GetFolderView(Ctrl, pt);
FV.IconSize = 19;
@tablacus
tablacus / focustreeview.js
Created December 24, 2019 13:46
Focus tree view - Tablacus Explorer
FV.TreeView.Focus();
return S_OK;
@tablacus
tablacus / CopyCurrentFolderAsText.js
Last active May 12, 2020 06:01
Copy current folder as text - Tablacus Explorer
clipboardData.setData("text", FV.FolderItem.Path);
@tablacus
tablacus / MoveSelectedItemsToParent.js
Created September 5, 2017 12:49
Move selected items to the parent folder
var FV = GetFolderView(Ctrl, pt);
var Selected = FV.SelectedItems();
if (Selected) {
var oDest = sha.NameSpace(fso.GetParentFolderName(api.GetDisplayNameOf(FV, SHGDN_FORPARSING)));
if (oDest) {
oDest.MoveHere(Selected, FOF_ALLOWUNDO);
}
}
@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;
@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 / 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 / locked.css
Created July 16, 2020 14:09
Locked tab style sheet
.locked {
background-color: #ffff00;
}