Skip to content

Instantly share code, notes, and snippets.

View tablacus's full-sized avatar

Gaku tablacus

View GitHub Profile
@tablacus
tablacus / timeout.js
Created December 26, 2021 12:36
Switch add-ons after 500ms - Tablacus Explorer
setTimeout(function () {
Exec(te, ["cmigemo,0", "filterlist,1"].join("\n"), "Addon switcher");
}, 500);
@tablacus
tablacus / toggle_selection_with_inline_renaming.js
Created December 18, 2021 13:59
Toggle selection with inline renaming - Tablacus Explorer
const hEdit = api.SendMessage(FV.hwndList, LVM_GETEDITCONTROL, 0, 0);
const fn = api.GetWindowText(hEdit);
let start = api.SendMessage(hEdit, 0xB0, 0, 0);//EM_GETSEL
const end = Math.floor(start >> 16);
start &= 0xffff;
if (fn.indexOf(".") >= 0) {
if (start) {
api.SendMessage(hEdit, 0xB1, 0, fn.length);//EM_SETSEL
} else {
if (end == fn.length) {
@tablacus
tablacus / open_chrome_form_url_shortcut.js
Created December 17, 2021 13:01
Open chrome from url shortcut - Tablacus Explorer
const Selected = FV.SelectedItems();
if (Selected.Count != 1) {
return;
}
wsh.run('"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe "' + Selected.Item(0).ExtendedProperty("linktarget"));
@tablacus
tablacus / add_tabgroups.js
Created November 21, 2021 07:59
Add tabgroups * Reuire "tabgroups" - Tablacus Explorer
Sync.Tabgroups.Add();
@tablacus
tablacus / top1bottom2.js
Last active November 22, 2021 10:59
Splut top1 bottom 2 - Tablacus Explorer * require split
const TC = [await te.Ctrl(CTRL_TC)];
await Addons.Split.Exec2(3, TC);
TC[0].Left = 0;
TC[0].Top = 0;
TC[0].Width = "100%";
TC[0].Height = "50%";
TC[1].Left = 0;
TC[1].Top = "50%";
TC[1].Width = "50%";
TC[1].Height = "50%";
@tablacus
tablacus / right1left2.js
Last active November 20, 2021 12:10
Split right 1 left 2 - Tablacus Explorer * require split
const TC = [await te.Ctrl(CTRL_TC)];
await Addons.Split.Exec2(3, TC);
TC[0].Left = 0;
TC[0].Top = 0;
TC[0].Width = "50%";
TC[0].Height = "50%";
TC[1].Left = 0;
TC[1].Top = "50%";
TC[1].Width = "50%";
TC[1].Height = "50%";
@tablacus
tablacus / switchbrowser.js
Created November 14, 2021 10:03
Trident <--> Blink - Tablacus Explorer
wsh.CurrentDirectory = fso.BuildPath(te.Data.Installed, 'lib');
if (window.chrome) {
fso.MoveFile('tewv64.dll', '_tewv64.dll');
fso.MoveFile('tewv32.dll', '_tewv32.dll');
} else {
fso.MoveFile('_tewv64.dll', 'tewv64.dll');
fso.MoveFile('_tewv32.dll', 'tewv32.dll');
}
FinalizeUI();
te.Reload(1);
@tablacus
tablacus / focusframe.js
Last active November 8, 2021 12:01
Focus frame - tablacus Explroer
const hTree = FindChildByClass(FV.hwnd, WC_TREEVIEW);
if (hTree) {
api.SetFocus(hTree);
}
return S_OK;
@tablacus
tablacus / openfavoritesmenu.js
Created October 30, 2021 03:38
Open favorites menu - Tablacus Explorer
const pt = api.Memory("POINT");
api.ClientToScreen(te.hwnd, pt);
ExecMenu(te, "Favorites", pt, 0);
return S_OK;
@tablacus
tablacus / selectitemandgodown.js
Created October 13, 2021 22:46
Select item and go one down - Tablacus Explorer
let nIndex = FV.GetFocusedItem;
FV.SelectItem(nIndex, SVSI_SELECT);
if (++nIndex < FV.ItemCount(SVGIO_ALLVIEW)) {
FV.SelectItem(nIndex, (Ctrl.hwndList && api.SendMessage(Ctrl.hwndList, LVM_GETITEMSTATE, nIndex, LVIS_SELECTED) ? SVSI_SELECT : SVSI_DESELECT) | SVSI_ENSUREVISIBLE | SVSI_FOCUSED);
}