diff --git a/addonsupdater/config.xml b/addonsupdater/config.xml index adfc2d8f..9f0fbb1e 100644 --- a/addonsupdater/config.xml +++ b/addonsupdater/config.xml @@ -1,11 +1,12 @@ - + - 1.06 - 2019.9.1 - Sun, 01 Sep 2019 00:00:00 GMT + 1.07 + 2021.1.5 + Wed, 06 Jan 2021 00:00:00 GMT + 2 Gaku - http://tablacus.github.io/TablacusExplorerAddons/ + https://tablacus.github.io/TablacusExplorerAddons/ MIT License @@ -16,4 +17,7 @@ アドオンの更新 Tablacus Explorerの更新確認時にアドオンを更新します + + 更新附加元件 + diff --git a/addonsupdater/script.js b/addonsupdater/script.js index b94a379d..61c2f6b0 100644 --- a/addonsupdater/script.js +++ b/addonsupdater/script.js @@ -1,102 +1,98 @@ -var Addon_Id = "addonsupdater"; +const Addon_Id = "addonsupdater"; if (window.Addon == 1) { - Addons.AddonsUpdater = - { + Addons.AddonsUpdater = { url: "https://tablacus.github.io/TablacusExplorerAddons/", - Exec: function (Ctrl, pt) - { - var arg = { - pcRef: [0], - Updated: api.CreateObject("FolderItems"), - addons: fso.BuildPath(wsh.ExpandEnvironmentStrings("%TEMP%"), "tablacus\\addons"), - - fn: function (arg) - { - while (arg.pcRef[0]) { - api.Sleep(500); - api.DoEvents(); - } - if (arg.Updated.Count) { - sha.NameSpace(fso.BuildPath(fso.GetParentFolderName(api.GetModuleFileName(null)), "addons")).MoveHere(arg.Updated, FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR); - te.Reload(); - } - } - }; - DeleteItem(arg.addons); - OpenHttpRequest(Addons.AddonsUpdater.url + "index.xml", "http", Addons.AddonsUpdater.List, arg); + Exec: async function (Ctrl, pt) { + const arg = await api.CreateObject("Object"); + arg.pcRef = await api.CreateObject("Array"); + arg.pcRef[0] = 0; + arg.Updated = await api.CreateObject("FolderItems"); + arg.addons = BuildPath(await te.Data.TempFolder, "addons"), + arg.bReload = true; + DeleteItem(await arg.addons); + OpenHttpRequest(Addons.AddonsUpdater.url + "index.xml", "http", "Addons.AddonsUpdater.List", arg); return S_OK; }, - List: function (xhr, url, arg) - { - var xml = xhr.get_responseXML ? xhr.get_responseXML() : xhr.responseXML; + List: async function (xhr, url, arg) { + const xml = await xhr.get_responseXML ? await xhr.get_responseXML() : xhr.responseXML; if (xml) { - var items = xml.getElementsByTagName("Item"); - for (var i = 0; i < items.length; i++) { - var item = items[i]; - var info = []; - var Id = item.getAttribute("Id"); - var installed = GetAddonInfo(Id); - if (installed) { + const items = await xml.getElementsByTagName("Item"); + const TEVer = await AboutTE(0); + const bAll = GetNum(await arg.all); + const nLen = await GetLength(items); + for (let i = 0; i < nLen; i++) { + const item = await items[i]; + const info = {}; + const Id = await item.getAttribute("Id"); + const installed = await GetAddonInfo(Id); + if (installed && await installed.Version) { GetAddonInfo2(item, info, "General"); - if (installed.Version < info.Version) { - if (arg.all || AboutTE(0) >= CalcVersion(info.MinVersion)) { - MainWindow.AddonDisabled(Id); - if (AddonBeforeRemove(Id) < 0) { + if (await installed.Version < info.Version) { + if (bAll || TEVer >= CalcVersion(info.MinVersion)) { + await MainWindow.AddonDisabled(Id); + if (await AddonBeforeRemove(Id) < 0) { return; } - OpenHttpRequest(Addons.AddonsUpdater.url + Id + '/' + Id + '_' + (info.Version.replace(/\./, "")) + '.zip', "http", Addons.AddonsUpdater.Save, arg); + OpenHttpRequest(Addons.AddonsUpdater.url + Id + '/' + Id + '_' + ((info.Version).replace(/\./, "")) + '.zip', "http", "Addons.AddonsUpdater.Save", arg); } } } } - if (arg.fn) { - arg.fn(arg); + if (GetNum(await arg.bReload)) { + Addons.AddonsUpdater.Reload(arg); } } }, - Save: function (xhr, url, arg) - { - var res = /([^\/]+)\/([^\/]+)$/.exec(url); + Save: async function (xhr, url, arg) { + debugger; + const res = /([^\/]+)\/([^\/]+)$/.exec(url); if (res) { - var Id = res[1]; - var file = res[2]; - var temp = arg.addons; - CreateFolder2(fso.GetParentFolderName(temp)); + const Id = res[1]; + const file = res[2]; + const temp = await arg.addons; + CreateFolder2(GetParentFolderName(temp)); CreateFolder2(temp); - var dest = fso.BuildPath(temp, Id); - var hr = Extract(fso.BuildPath(wsh.ExpandEnvironmentStrings("%TEMP%"), "tablacus\\" + file), temp, xhr); + const dest = BuildPath(temp, Id); + const hr = await Extract(BuildPath(await te.Data.TempFolder, file), temp, xhr); if (hr) { - MessageBox([api.LoadString(hShell32, 4228).replace(/^\t/, "").replace("%d", api.sprintf(99, "0x%08x", hr)), GetText("Extract"), file].join("\n\n"), TITLE, MB_OK | MB_ICONSTOP); + MessageBox([(await api.LoadString(hShell32, 4228)).replace(/^\t/, "").replace("%d", await api.sprintf(99, "0x%08x", hr)), await GetText("Extract"), file].join("\n\n"), TITLE, MB_OK | MB_ICONSTOP); return; } - var configxml = dest + "\\config.xml"; - for (var nDog = 300; !fso.FileExists(configxml);) { - if (wsh.Popup(GetText("Please wait."), 1, TITLE, MB_ICONINFORMATION | MB_OKCANCEL) == IDCANCEL || nDog-- == 0) { + const configxml = dest + "\\config.xml"; + for (let nDog = 300; !await $.fso.FileExists(configxml);) { + if ($.wsh.Popup(await GetText("Please wait."), 1, TITLE, MB_ICONINFORMATION | MB_OKCANCEL) == IDCANCEL || nDog-- == 0) { return; } } arg.Updated.AddItem(dest); } + }, + + Reload: async function (arg) { + if (await arg.pcRef && await arg.pcRef[0]) { + setTimeout(Addons.AddonsUpdater.Reload, 500, arg); + return; + } + if (await arg.Updated.Count) { + await sha.NameSpace(BuildPath(ui_.Installed, "addons")).MoveHere(await arg.Updated, FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR); + te.Reload(); + } } }; AddEvent("CheckUpdate", Addons.AddonsUpdater.Exec); - AddEvent("CreateUpdater", function (arg) - { - arg.pcRef = [0]; - arg.Updated = api.CreateObject("FolderItems"); - arg.addons = fso.BuildPath(arg.temp, "addons"); + AddEvent("CreateUpdater", async function (arg) { arg.all = true; - OpenHttpRequest(Addons.AddonsUpdater.url + "index.xml", "http", Addons.AddonsUpdater.List, arg); - while (arg.pcRef[0]) { - api.Sleep(500); - api.DoEvents(); - } + arg.pcRef = await api.CreateObject("Array"); + arg.pcRef[0] = 0; + arg.Updated = await api.CreateObject("FolderItems"); + arg.addons = BuildPath(await arg.temp, "addons"); + OpenHttpRequest("https://tablacus.github.io/TablacusExplorerAddons/index.xml", "http", "Addons.AddonsUpdater.List", arg); }, true); AddTypeEx("Add-ons", "Addons updater", Addons.AddonsUpdater.Exec); diff --git a/docs/addonsupdater/addonsupdater_107.zip b/docs/addonsupdater/addonsupdater_107.zip new file mode 100644 index 00000000..4f041e31 Binary files /dev/null and b/docs/addonsupdater/addonsupdater_107.zip differ diff --git a/docs/execfilter/execfilter_101.zip b/docs/execfilter/execfilter_101.zip new file mode 100644 index 00000000..63e8d933 Binary files /dev/null and b/docs/execfilter/execfilter_101.zip differ diff --git a/docs/explorerbrowserfilter/explorerbrowserfilter_101.zip b/docs/explorerbrowserfilter/explorerbrowserfilter_101.zip new file mode 100644 index 00000000..0de287e3 Binary files /dev/null and b/docs/explorerbrowserfilter/explorerbrowserfilter_101.zip differ diff --git a/docs/foldermenufilter/foldermenufilter_102.zip b/docs/foldermenufilter/foldermenufilter_102.zip new file mode 100644 index 00000000..b8c808ad Binary files /dev/null and b/docs/foldermenufilter/foldermenufilter_102.zip differ diff --git a/docs/index.xml b/docs/index.xml index 68ee5201..91c551d7 100644 --- a/docs/index.xml +++ b/docs/index.xml @@ -1,5 +1,12 @@  -1.012020.12.31Tue, 05 Jan 2021 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/switchhiddenfilter.html
Switch hidden filterSwitch hidden filter非表示フィルタの切り替え隱藏篩選開關
+1.012021.1.5Wed, 06 Jan 2021 00:00:00 GMTGakuExecution filterExecution filter実行フィルタ執行過濾器 +1.012021.1.5Wed, 06 Jan 2021 00:00:00 GMTGakuExplorer browser filterExplorer browser filterエクスプローラブラウザフィルタ +1.012021.1.5Wed, 06 Jan 2021 00:00:00 GMTGakuRotate paneRotate paneペインを回転させる +1.022021.1.5Wed, 06 Jan 2021 00:00:00 GMTGakuFolder menu filterFolder menu filterフォルダメニューフィルタ +1.022021.1.5Wed, 06 Jan 2021 00:00:00 GMTGakuSort tabsSort tabsタブをソート +1.072021.1.5Wed, 06 Jan 2021 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/addonsupdater.html
Add-ons updaterUpdate add-ons when checking for updates of Tablacus Explorerアドオンの更新Tablacus Explorerの更新確認時にアドオンを更新します更新附加元件
+1.082021.1.5Wed, 06 Jan 2021 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/teracopy.html
TeraCopyFile operations in TeraCopy.TeraCopyTeraCopyでファイル操作を行います。
+1.012020.12.31Tue, 05 Jan 2021 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/switchhiddenfilter.html
Switch hidden filterSwitch hidden filter非表示フィルタの切り替え隱藏篩選開關
1.022020.12.31Tue, 05 Jan 2021 00:00:00 GMTGakuSpace free columnSpace free column. *Windows Vista or higher is required.空き領域カラム可用空間欄位 1.042020.12.31Tue, 05 Jan 2021 00:00:00 GMTGakuForce refreshForce refresh on change tab.強制的に更新タブ切り替え時に強制的に更新します。自動重新整理 1.082020.12.31Tue, 05 Jan 2021 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/folderbutton.html
Folder buttonFolder buttonフォルダ ボタン資料夾按鈕
@@ -82,7 +89,6 @@ 1.032020.12.16Sat, 19 Dec 2020 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/autosave.html
Auto saveSave settings periodically.自動的に保存定時儲存設定
1.022020.12.16Fri, 18 Dec 2020 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/autorestart.html
Auto restartRestart Tablacus Explorer after a period of inactivity.自動的に再起動一定時間使用していない場合、Tablacus Explorerを再起動します。
1.022020.12.16Fri, 18 Dec 2020 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/dlldirectory.html
Dll directoryDll directoryDllディレクトリ
-1.072020.12.16Fri, 18 Dec 2020 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/teracopy.html
TeraCopyFile operations in TeraCopy.TeraCopyTeraCopyでファイル操作を行います。
1.102020.12.16Fri, 18 Dec 2020 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/openinstead.html
Open insteadOpen instead of Explorerエクスプローラの代わりに開くエクスプローラの代わりにTablacus Explorerで開きます。接替檔案總管
1.242020.12.16Fri, 18 Dec 2020 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/tabs.html
TabsTabsタブタブ
1.012020.12.16Thu, 17 Dec 2020 00:00:00 GMTGakuShow thumbnails with small iconsShow thumbnails with small icons小さいアイコンで縮小版表示 @@ -255,15 +261,9 @@ Left-arrow key: Move to the previous item.右キー 1.022020.6.24Wed, 24 Jun 2020 00:00:00 GMTGakuSelect plusSelects items after background file operations.(Not perfect)項目選択プラスバックグラウンドのファイル操作後に項目を選択します。(完璧ではありません) 1.012020.6.17Wed, 17 Jun 2020 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/noemphasis.html
No emphasisDon't emphasize the selected column選択したカラムを強調しない無需強調排序欄位
1.022020.6.17Wed, 17 Jun 2020 00:00:00 GMTGakuOrder of Selected itemsSelected items are in the order they appear in the view.選択項目の順序選択項目を表示された順にします。順序處理選擇項目 -1.002020.5.29Thu, 28 May 2020 00:00:00 GMTGakuExplorer browser filterExplorer browser filterエクスプローラ ブラウザ フィルタ -1.012020.5.22Fri, 22 May 2020 00:00:00 GMTGakuFolder menu filterFolder menu filterフォルダメニューフィルタ 1.032020.5.15Fri, 15 May 2020 00:00:00 GMTGakuBackground image背景画像 1.002020.5.9Sat, 09 May 2020 00:00:00 GMTGakuLock only disables "Close tab"Lock only disables "Close tab"ロックは「タブを閉じる」だけ無効にする -1.002020.5.9Sat, 09 May 2020 00:00:00 GMTGakuRotate paneRotate paneペインを回転させる -1.012020.5.9Sat, 09 May 2020 00:00:00 GMTGakuSort tabsSort tabsタブのソート 1.002020.2.6Thu, 06 Feb 2020 00:00:00 GMTGakuClose all tabsClose all tabsすべてのタブを閉じる關閉所有分頁 -1.062019.9.1Sun, 01 Sep 2019 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/addonsupdater.html
Add-ons updaterUpdate add-ons when checking for updates of Tablacus Explorerアドオンの更新Tablacus Explorerの更新確認時にアドオンを更新します
-1.002019.5.11Mon, 13 May 2019 00:00:00 GMTGakuExecution filterExecution filter実行フィルタ実行フィルタ執行過濾器執行過濾器 1.082019.2.16Sat, 16 Feb 2019 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/startup.html
Startup settingsStartup settings of Tablacus Explorer.開始時の設定Tablacus Explorer開始時の設定
1.042018.2.25Sun, 25 Feb 2018 00:00:00 GMTGakuFix Windows 10 Creators Update (RS2) bugFix: The list is deviated or vanished.Windows 10 Creators Update (RS2) のバグ対策リストがずれたり消えたりするバグの対策 1.022018.1.30Tue, 30 Jan 2018 00:00:00 GMTGaku
https://tablacus.github.io/wiki/addons/opencpinexp.html
Open Control Panel in ExplorerOpen Control Panel in Explorer.コントロールパネルをエクスプローラで開くコントロールパネルをエクスプローラで開きます。
diff --git a/docs/rotatepane/rotatepane_101.zip b/docs/rotatepane/rotatepane_101.zip new file mode 100644 index 00000000..b0011273 Binary files /dev/null and b/docs/rotatepane/rotatepane_101.zip differ diff --git a/docs/sorttabs/sorttabs_102.zip b/docs/sorttabs/sorttabs_102.zip new file mode 100644 index 00000000..98934b4d Binary files /dev/null and b/docs/sorttabs/sorttabs_102.zip differ diff --git a/docs/te/releases.json b/docs/te/releases.json index 5e093806..d71f3192 100644 --- a/docs/te/releases.json +++ b/docs/te/releases.json @@ -1,8 +1,8 @@ -{"url":"https://api.github.com/repos/tablacus/TablacusExplorer/releases/35877814", -"assets_url":"https://api.github.com/repos/tablacus/TablacusExplorer/releases/35877814/assets", -"upload_url":"https://uploads.github.com/repos/tablacus/TablacusExplorer/releases/35877814/assets{?name,label}", -"html_url":"https://github.com/tablacus/TablacusExplorer/releases/tag/20.12.31", -"id":35877814, +{"url":"https://api.github.com/repos/tablacus/TablacusExplorer/releases/35995112", +"assets_url":"https://api.github.com/repos/tablacus/TablacusExplorer/releases/35995112/assets", +"upload_url":"https://uploads.github.com/repos/tablacus/TablacusExplorer/releases/35995112/assets{?name,label}", +"html_url":"https://github.com/tablacus/TablacusExplorer/releases/tag/21.1.5", +"id":35995112, "author":{"login":"tablacus", "id":5156977, "node_id":"MDQ6VXNlcjUxNTY5Nzc=", @@ -20,16 +20,16 @@ "events_url":"https://api.github.com/users/tablacus/events{/privacy}", "received_events_url":"https://api.github.com/users/tablacus/received_events", "type":"User", -"site_admin":false},"node_id":"MDc6UmVsZWFzZTM1ODc3ODE0", -"tag_name":"20.12.31", +"site_admin":false},"node_id":"MDc6UmVsZWFzZTM1OTk1MTEy", +"tag_name":"21.1.5", "target_commitish":"master", "name":"", -"draft":false,"prerelease":false,"created_at":"2020-12-31T14:48:43Z", -"published_at":"2020-12-31T14:50:58Z", -"assets":[{"url":"https://api.github.com/repos/tablacus/TablacusExplorer/releases/assets/30171027", -"id":30171027, -"node_id":"MDEyOlJlbGVhc2VBc3NldDMwMTcxMDI3", -"name":"te201231.zip", +"draft":false,"prerelease":false,"created_at":"2021-01-05T13:06:23Z", +"published_at":"2021-01-05T13:07:31Z", +"assets":[{"url":"https://api.github.com/repos/tablacus/TablacusExplorer/releases/assets/30293970", +"id":30293970, +"node_id":"MDEyOlJlbGVhc2VBc3NldDMwMjkzOTcw", +"name":"te210105.zip", "label":null,"uploader":{"login":"tablacus", "id":5156977, "node_id":"MDQ6VXNlcjUxNTY5Nzc=", @@ -49,9 +49,9 @@ "type":"User", "site_admin":false},"content_type":"application/x-zip-compressed", "state":"uploaded", -"size":654984, -"created_at":"2021-01-01T14:35:49Z", -"updated_at":"2021-01-01T14:35:51Z", -"browser_download_url":"https://github.com/tablacus/TablacusExplorer/releases/download/20.12.31/te201231.zip"}],"tarball_url":"https://api.github.com/repos/tablacus/TablacusExplorer/tarball/20.12.31", -"zipball_url":"https://api.github.com/repos/tablacus/TablacusExplorer/zipball/20.12.31", -"body":"Adjusted: Blink project\r\nTablacus Explorer WebView2 Developer Edition is now available.\r\nTablacus Explorer WebView2 開発者版を公開中。\r\n\r\n[VirusTotal](https://www.virustotal.com/gui/file/8966d46cec8bab0292f18f0950db0fad3f2ea27649806df56d53a414eaf738d5/detection)\r\n"} +"size":655023, +"created_at":"2021-01-05T13:07:03Z", +"updated_at":"2021-01-05T13:07:05Z", +"browser_download_url":"https://github.com/tablacus/TablacusExplorer/releases/download/21.1.5/te210105.zip"}],"tarball_url":"https://api.github.com/repos/tablacus/TablacusExplorer/tarball/21.1.5", +"zipball_url":"https://api.github.com/repos/tablacus/TablacusExplorer/zipball/21.1.5", +"body":"Adjusted: Blink project\r\nTablacus Explorer WebView2 Developer Edition is now available.\r\nTablacus Explorer WebView2 開発者版を公開中。\r\n\r\n[VirusTotal](https://www.virustotal.com/gui/file/f20ffe5c246934e91446710148d1aca391a26cb23a73117d361112e95529f7c4/detection)\r\n"} diff --git a/docs/te/te.zip b/docs/te/te.zip index f5fbc6b7..685cdb51 100644 Binary files a/docs/te/te.zip and b/docs/te/te.zip differ diff --git a/docs/te/te201231.zip b/docs/te/te210105.zip similarity index 93% rename from docs/te/te201231.zip rename to docs/te/te210105.zip index f5fbc6b7..685cdb51 100644 Binary files a/docs/te/te201231.zip and b/docs/te/te210105.zip differ diff --git a/docs/teracopy/teracopy_108.zip b/docs/teracopy/teracopy_108.zip new file mode 100644 index 00000000..c6c9fbc7 Binary files /dev/null and b/docs/teracopy/teracopy_108.zip differ diff --git a/execfilter/config.xml b/execfilter/config.xml index fd83810a..b1775551 100644 --- a/execfilter/config.xml +++ b/execfilter/config.xml @@ -1,11 +1,12 @@ - 1.00 - 2019.5.11 - Mon, 13 May 2019 00:00:00 GMT + 1.01 + 2021.1.5 + Wed, 06 Jan 2021 00:00:00 GMT + 2 Gaku - http://tablacus.github.io/TablacusExplorerAddons/ + https://tablacus.github.io/TablacusExplorerAddons/ MIT License @@ -14,10 +15,8 @@ 実行フィルタ - 実行フィルタ 執行過濾器 - 執行過濾器 diff --git a/execfilter/script.js b/execfilter/script.js index c4629870..139801d1 100644 --- a/execfilter/script.js +++ b/execfilter/script.js @@ -1,94 +1,4 @@ +const Addon_Id = "execfilter"; if (window.Addon == 1) { - AddType("Execution filter", - { - Exec: function (Ctrl, s, type, hwnd, pt) - { - var FV = GetFolderView(Ctrl, pt); - Selected = FV.SelectedItems(); - if (Selected.Count) { - var Item = Selected.Item(0); - var Path = Item.Path; - if (IsFolderEx(Item)) { - var Path2 = Path + ".folder"; - } - for (var lines = s.split("\n"); lines.length;) { - var ar = lines.shift().split(","); - if (ar[0] && ar.length > 2) { - if (PathMatchEx(Path, ar[0]) || (Path2 && PathMatchEx(Path2, ar[0]))) { - return Exec(Ctrl, ar[2], ar[1], hwnd, pt); - } - } - } - } - }, - - Ref: function (s, pt) - { - var last = s.split("\n").pop(); - var ar = last.split(","); - switch (ar.length) { - case 2: - var arFunc = []; - RunEvent1("AddType", arFunc); - var r = g_basic.Popup(arFunc, s, pt); - if (r) { - return s + r + ","; - } - break; - case 3: - var Id = GetSourceText(ar[1]); - var r = OptionRef(Id, "", pt); - if (/^string$/i.test(typeof r)) { - return s + r + "\n"; - } - break; - default: - var r = InputDialog("Filter", last); - if (r) { - return s + (s.length && !/\n$/.test(s) ? "\n" : "") + r + ","; - } - break; - } - } - }); - - AddEvent("OptionEncode", function (Id, p) - { - if (Id.toLowerCase() == "execution filter") { - var lines = p.s.split("\n"); - for (var i = lines.length; i--;) { - var ar = lines[i].split(","); - if (ar[1]) { - ar[1] = GetSourceText(ar[1]); - if (ar[2]) { - var p2 = { s: ar[2] }; - MainWindow.OptionEncode(ar[1], p2); - ar[2] = p2.s; - } - lines[i] = ar.join(","); - } - } - p.s = lines.join("\n"); - } - }); - - AddEvent("OptionDecode", function (Id, p) - { - if (Id.toLowerCase() == "execution filter") { - var lines = p.s.split("\n"); - for (var i = lines.length; i--;) { - var ar = lines[i].split(","); - if (ar[1]) { - if (ar[2]) { - var p2 = { s: ar[2] }; - MainWindow.OptionDecode(ar[1], p2); - ar[2] = p2.s; - } - ar[1] = GetText(ar[1]); - lines[i] = ar.join(","); - } - } - p.s = lines.join("\n"); - } - }); + $.importScript("addons\\" + Addon_Id + "\\sync.js"); } diff --git a/execfilter/sync.js b/execfilter/sync.js new file mode 100644 index 00000000..9d9bc1cc --- /dev/null +++ b/execfilter/sync.js @@ -0,0 +1,88 @@ +AddType("Execution filter", { + Exec: function (Ctrl, s, type, hwnd, pt) { + const FV = GetFolderView(Ctrl, pt); + const Selected = FV.SelectedItems(); + if (Selected.Count) { + const Item = Selected.Item(0); + const Path = Item.Path; + let Path2; + if (IsFolderEx(Item)) { + Path2 = Path + ".folder"; + } + for (let lines = s.split("\n"); lines.length;) { + const ar = lines.shift().split(","); + if (ar[0] && ar.length > 2) { + if (PathMatchEx(Path, ar[0]) || (Path2 && PathMatchEx(Path2, ar[0]))) { + return Exec(Ctrl, ar[2], ar[1], hwnd, pt); + } + } + } + } + }, + + Ref: function (s, pt) { + const last = s.split("\n").pop(); + const ar = last.split(","); + switch (ar.length) { + case 2: + const arFunc = []; + RunEvent1("AddType", arFunc); + let r = g_basic.Popup(arFunc, s, pt); + if (r) { + return s + r + ","; + } + break; + case 3: + const Id = GetSourceText(ar[1]); + r = OptionRef(Id, "", pt); + if (/^string$/i.test(typeof r)) { + return s + r + "\n"; + } + break; + default: + r = InputDialog("Filter", last); + if (r) { + return s + (s.length && !/\n$/.test(s) ? "\n" : "") + r + ","; + } + break; + } + } +}); + +AddEvent("OptionEncode", function (Id, p) { + if (SameText(Id, "execution filter")) { + const lines = p.s.split("\n"); + for (let i = lines.length; i--;) { + const ar = lines[i].split(","); + if (ar[1]) { + ar[1] = GetSourceText(ar[1]); + if (ar[2]) { + const p2 = { s: ar[2] }; + MainWindow.OptionEncode(ar[1], p2); + ar[2] = p2.s; + } + lines[i] = ar.join(","); + } + } + p.s = lines.join("\n"); + } +}); + +AddEvent("OptionDecode", function (Id, p) { + if (SameText(Id.toLowerCase(), "execution filter")) { + const lines = p.s.split("\n"); + for (let i = lines.length; i--;) { + const ar = lines[i].split(","); + if (ar[1]) { + if (ar[2]) { + const p2 = { s: ar[2] }; + MainWindow.OptionDecode(ar[1], p2); + ar[2] = p2.s; + } + ar[1] = GetText(ar[1]); + lines[i] = ar.join(","); + } + } + p.s = lines.join("\n"); + } +}); diff --git a/explorerbrowserfilter/config.xml b/explorerbrowserfilter/config.xml index 2390377f..776bc28d 100644 --- a/explorerbrowserfilter/config.xml +++ b/explorerbrowserfilter/config.xml @@ -1,12 +1,13 @@ - 1.00 - 2020.5.29 - Thu, 28 May 2020 00:00:00 GMT + 1.01 + 2021.1.5 + Wed, 06 Jan 2021 00:00:00 GMT Common:0:0 + 2 Gaku - http://tablacus.github.io/TablacusExplorerAddons/ + https://tablacus.github.io/TablacusExplorerAddons/ MIT License @@ -14,6 +15,6 @@ Explorer browser filter - エクスプローラ ブラウザ フィルタ + エクスプローラブラウザフィルタ diff --git a/explorerbrowserfilter/options.js b/explorerbrowserfilter/options.js new file mode 100644 index 00000000..95b3bf60 --- /dev/null +++ b/explorerbrowserfilter/options.js @@ -0,0 +1,23 @@ +Addon_Id = "explorerbrowserfilter"; + +SetTabContents(0, "", await ReadTextFile("addons\\" + Addon_Id + "\\options.html")); + +Addons.ExplorerBrowserFilter = { + AddPath: async function (path) { + if (!path) { + return; + } + path = await api.GetDisplayNameOf(path, SHGDN_FORADDRESSBAR | SHGDN_FORPARSING); + if (await api.GetKeyState(VK_SHIFT) < 0) { + path = BuildPath("*", await fso.GetFileName(path)); + } + if (path) { + const ar = [document.F.Filter.value.replace(/\s+$/, ""), path]; + document.F.Filter.value = (ar[0] ? ar.join("\n") : path).replace(/^\s+|\s$/g, ""); + } + }, + + BrowseFolder: async function () { + this.AddPath(await BrowseForFolder(ssfDESKTOP)); + } +} diff --git a/explorerbrowserfilter/script.js b/explorerbrowserfilter/script.js index 904d6c70..bce7096f 100644 --- a/explorerbrowserfilter/script.js +++ b/explorerbrowserfilter/script.js @@ -1,36 +1,11 @@ -Addon_Id = "explorerbrowserfilter"; - +const Addon_Id = "explorerbrowserfilter"; if (window.Addon == 1) { - var item = GetAddonElement(Addon_Id); - te.ExplorerBrowserFilter = ExtractFilter(GetAddonOption(Addon_Id, "Filter")), + const item = await GetAddonElement(Addon_Id); + te.ExplorerBrowserFilter = await ExtractFilter(item.getAttribute("Filter")); AddEventId("AddonDisabledEx", Addon_Id, function () { te.ExplorerBrowserFilter = null; }); } else { - var ado = OpenAdodbFromTextFile("addons\\" + Addon_Id + "\\options.html"); - if (ado) { - SetTabContents(0, "", ado.ReadText(adReadAll)); - ado.Close(); - } - - Addons.ExplorerBrowserFilter = { - AddPath: function (path) { - if (!path) { - return; - } - path = api.GetDisplayNameOf(path, SHGDN_FORADDRESSBAR | SHGDN_FORPARSING); - if (api.GetKeyState(VK_SHIFT) < 0) { - path = fso.BuildPath("*", fso.GetFileName(path)); - } - if (path) { - var ar = [document.F.Filter.value.replace(/\s+$/, ""), path]; - document.F.Filter.value = (ar[0] ? ar.join("\n") : path).replace(/^\s+|\s$/g, ""); - } - }, - - BrowseFolder: function () { - this.AddPath(BrowseForFolder(ssfDESKTOP)); - } - } + importScript("addons\\" + Addon_Id + "\\options.js"); } diff --git a/foldermenufilter/config.xml b/foldermenufilter/config.xml index f4f19d15..ff6b6a7a 100644 --- a/foldermenufilter/config.xml +++ b/foldermenufilter/config.xml @@ -1,12 +1,13 @@ - 1.01 - 2020.5.22 - Fri, 22 May 2020 00:00:00 GMT + 1.02 + 2021.1.5 + Wed, 06 Jan 2021 00:00:00 GMT Common:0:0 + 2 Gaku - http://tablacus.github.io/TablacusExplorerAddons/ + https://tablacus.github.io/TablacusExplorerAddons/ MIT License diff --git a/foldermenufilter/options.js b/foldermenufilter/options.js index 82912cc7..36a57877 100644 --- a/foldermenufilter/options.js +++ b/foldermenufilter/options.js @@ -1,30 +1,26 @@ -var ado = OpenAdodbFromTextFile("addons\\" + Addon_Id + "\\options.html"); -if (ado) { - SetTabContents(0, "Hidden", ado.ReadText(adReadAll)); - ado.Close(); -} +SetTabContents(0, "Hidden", await ReadTextFile("addons\\" + Addon_Id + "\\options.html")); Addons.FolderMenuFilter = { - AddPath: function (path) { + AddPath: async function (path) { if (!path) { return; } - path = api.PathUnquoteSpaces(path); - if (api.GetKeyState(VK_SHIFT) < 0) { - path = fso.BuildPath("*", fso.GetFileName(path)); + path = await api.PathUnquoteSpaces(path); + if (await api.GetKeyState(VK_SHIFT) < 0) { + path = BuildPath("*", await fso.GetFileName(path)); } if (path || path === ssfDESKTOP) { - var ar = [document.F.Hidden.value.replace(/\s+$/, ""), path]; + const ar = [document.F.Hidden.value.replace(/\s+$/, ""), path]; document.F.Hidden.value = (ar[0] ? ar.join("\n") : path).replace(/^\s+|\s$/g, ""); } }, - ChooseFolder: function (o) { - var pt = GetPos(o, 9); - this.AddPath(MainWindow.ChooseFolder(ssfDESKTOP, pt, SHGDN_FORADDRESSBAR | SHGDN_FORPARSING)); + ChooseFolder: async function (o) { + const pt = await GetPosEx(o, 9); + this.AddPath(await MainWindow.ChooseFolder(ssfDESKTOP, pt, SHGDN_FORADDRESSBAR | SHGDN_FORPARSING)); }, - BrowseFolder: function () { - this.AddPath(BrowseForFolder(ssfDESKTOP)); + BrowseFolder: async function () { + this.AddPath(await BrowseForFolder(ssfDESKTOP)); } } diff --git a/foldermenufilter/script.js b/foldermenufilter/script.js index d9a05ea7..9879c62d 100644 --- a/foldermenufilter/script.js +++ b/foldermenufilter/script.js @@ -1,16 +1,6 @@ -Addon_Id = "foldermenufilter"; - +const Addon_Id = "foldermenufilter"; if (window.Addon == 1) { - var item = GetAddonElement(Addon_Id); - Addons.FolderMenuFilter = { - Hidden: ExtractFilter(GetAddonOption(Addon_Id, "Hidden") || "-"), - }; - AddEvent("FolderMenuAddMenuItem", function (hMenu, mii, FolderItem, bSelect) - { - if (PathMatchEx(FolderItem.Path, Addons.FolderMenuFilter.Hidden)) { - return S_FALSE; - } - }); + $.importScript("addons\\" + Addon_Id + "\\sync.js"); } else { importScript("addons\\" + Addon_Id + "\\options.js"); } diff --git a/foldermenufilter/sync.js b/foldermenufilter/sync.js new file mode 100644 index 00000000..c590554f --- /dev/null +++ b/foldermenufilter/sync.js @@ -0,0 +1,12 @@ +const Addon_Id = "foldermenufilter"; +const item = GetAddonElement(Addon_Id); + +Sync.FolderMenuFilter = { + Hidden: ExtractFilter(GetAddonOption(Addon_Id, "Hidden") || "-"), +}; + +AddEvent("FolderMenuAddMenuItem", function (hMenu, mii, FolderItem, bSelect) { + if (PathMatchEx(FolderItem.Path, Sync.FolderMenuFilter.Hidden)) { + return S_FALSE; + } +}); diff --git a/rotatepane/config.xml b/rotatepane/config.xml index 4233b8ac..5a04525c 100644 --- a/rotatepane/config.xml +++ b/rotatepane/config.xml @@ -1,12 +1,13 @@ - 1.00 - 2020.5.9 - Sat, 09 May 2020 00:00:00 GMT + 1.01 + 2021.1.5 + Wed, 06 Jan 2021 00:00:00 GMT Common:5,6,7,8,9:5 + 2 Gaku - http://tablacus.github.io/TablacusExplorerAddons/ + https://tablacus.github.io/TablacusExplorerAddons/ MIT License diff --git a/rotatepane/script.js b/rotatepane/script.js index d511ec2d..8cee5041 100644 --- a/rotatepane/script.js +++ b/rotatepane/script.js @@ -1,84 +1,17 @@ -var Addon_Id = "rotatepane"; -var Default = "ToolBar2Left"; - -var item = GetAddonElement(Addon_Id); +const Addon_Id = "rotatepane"; +const Default = "ToolBar2Left"; +const item = await GetAddonElement(Addon_Id); if (!item.getAttribute("Set")) { item.setAttribute("Menu", "Tool"); item.setAttribute("MenuPos", -1); item.setAttribute("KeyOn", "All"); item.setAttribute("MouseOn", "List"); } - if (window.Addon == 1) { - Addons.RotatePane = - { - strName: item.getAttribute("MenuName") || GetAddonInfo(Addon_Id).Name, - nPos: api.LowPart(item.getAttribute("MenuPos")), - - Exec: function (Ctrl, pt) { - var cTC = te.Ctrls(CTRL_TC, true); - var TC = te.Ctrl(CTRL_TC); - var nLen = cTC.length; - var ix = [], cPos = []; - for (var i = nLen; i--;) { - ix.push(i); - } - ix = ix.sort( - function (b, a) { - var rca = api.Memory("RECT"); - var rcb = api.Memory("RECT"); - api.GetWindowRect(cTC[a].hwnd, rca); - api.GetWindowRect(cTC[b].hwnd, rcb); - if (rca.Top > rcb.Top) { - return 1; - } else if (rca.Top < rcb.Top) { - return -1; - } - return rca.Left - rcb.Left; - } - ); - for (var i = nLen; i--;) { - var TC = cTC[ix[i]]; - cPos[(i + 1) % nLen] = { - Left: TC.Left, - Top: TC.Top, - Width: TC.Width, - Height: TC.Height, - }; - } - for (var i = nLen; i--;) { - var TC = cTC[ix[i]]; - TC.Left = cPos[i].Left; - TC.Top = cPos[i].Top; - TC.Width = cPos[i].Width; - TC.Height = cPos[i].Height; - } - GetFolderView(Ctrl, pt).Focus(); - return S_OK; - } - } - - AddTypeEx("Add-ons", "Rotate pane", Addons.RotatePane.Exec); - - //Menu - if (api.LowPart(item.getAttribute("MenuExec"))) { - AddEvent(item.getAttribute("Menu"), function (Ctrl, hMenu, nPos) { - api.InsertMenu(hMenu, Addons.RotatePane.nPos, MF_BYPOSITION | MF_STRING, ++nPos, GetText(Addons.RotatePane.strName)); - ExtraMenuCommand[nPos] = Addons.RotatePane.Exec; - return nPos; - }); - } - //Key - if (api.LowPart(item.getAttribute("KeyExec"))) { - SetKeyExec(item.getAttribute("KeyOn"), item.getAttribute("Key"), Addons.RotatePane.Exec, "Func"); - } - //Mouse - if (api.LowPart(item.getAttribute("MouseExec"))) { - SetGestureExec(item.getAttribute("MouseOn"), item.getAttribute("Mouse"), Addons.RotatePane.Exec, "Func"); - } - var h = GetIconSize(item.getAttribute("IconSize"), item.getAttribute("Location") == "Inner" && 16); - var src = item.getAttribute("Icon") || (h <= 16 ? "bitmap:ieframe.dll,216,16,33" : "bitmap:ieframe.dll,214,24,33"); - SetAddon(Addon_Id, Default, ['', GetImgTag({ title: Addons.RotatePane.strName, src: src }, h), '']); + const h = GetIconSize(item.getAttribute("IconSize"), item.getAttribute("Location") == "Inner" && 16); + const src = item.getAttribute("Icon") || (h <= 16 ? "bitmap:ieframe.dll,216,16,33" : "bitmap:ieframe.dll,214,24,33"); + SetAddon(Addon_Id, Default, ['', await GetImgTag({ title: item.getAttribute("MenuName") || await GetAddonInfo(Addon_Id).Name, src: src }, h), '']); + $.importScript("addons\\" + Addon_Id + "\\sync.js"); } else { EnableInner(); } diff --git a/rotatepane/sync.js b/rotatepane/sync.js new file mode 100644 index 00000000..1d51d546 --- /dev/null +++ b/rotatepane/sync.js @@ -0,0 +1,67 @@ +const Addon_Id = "rotatepane"; +const item = GetAddonElement(Addon_Id); + +Sync.RotatePane = { + strName: item.getAttribute("MenuName") || GetAddonInfo(Addon_Id).Name, + nPos: GetNum(item.getAttribute("MenuPos")), + + Exec: function (Ctrl, pt) { + const cTC = te.Ctrls(CTRL_TC, true); + const nLen = cTC.Count; + let ix = [], cPos = []; + for (let i = nLen; i--;) { + ix.push(i); + } + ix = ix.sort( + function (b, a) { + const rca = api.Memory("RECT"); + const rcb = api.Memory("RECT"); + api.GetWindowRect(cTC[a].hwnd, rca); + api.GetWindowRect(cTC[b].hwnd, rcb); + if (rca.Top > rcb.Top) { + return 1; + } else if (rca.Top < rcb.Top) { + return -1; + } + return rca.Left - rcb.Left; + } + ); + for (let i = nLen; i--;) { + const TC = cTC[ix[i]]; + cPos[(i + 1) % nLen] = { + Left: TC.Left, + Top: TC.Top, + Width: TC.Width, + Height: TC.Height, + }; + } + for (let i = nLen; i--;) { + const TC = cTC[ix[i]]; + TC.Left = cPos[i].Left; + TC.Top = cPos[i].Top; + TC.Width = cPos[i].Width; + TC.Height = cPos[i].Height; + } + GetFolderView(Ctrl, pt).Focus(); + return S_OK; + } +} + +AddTypeEx("Add-ons", "Rotate pane", Sync.RotatePane.Exec); + +//Menu +if (GetNum(item.getAttribute("MenuExec"))) { + AddEvent(item.getAttribute("Menu"), function (Ctrl, hMenu, nPos) { + api.InsertMenu(hMenu, Sync.RotatePane.nPos, MF_BYPOSITION | MF_STRING, ++nPos, GetText(Sync.RotatePane.strName)); + ExtraMenuCommand[nPos] = Sync.RotatePane.Exec; + return nPos; + }); +} +//Key +if (GetNum(item.getAttribute("KeyExec"))) { + SetKeyExec(item.getAttribute("KeyOn"), item.getAttribute("Key"), Sync.RotatePane.Exec, "Func"); +} +//Mouse +if (GetNum(item.getAttribute("MouseExec"))) { + SetGestureExec(item.getAttribute("MouseOn"), item.getAttribute("Mouse"), Sync.RotatePane.Exec, "Func"); +} diff --git a/sorttabs/config.xml b/sorttabs/config.xml index 0ededb93..cdc51671 100644 --- a/sorttabs/config.xml +++ b/sorttabs/config.xml @@ -1,12 +1,13 @@ - 1.01 - 2020.5.9 - Sat, 09 May 2020 00:00:00 GMT + 1.02 + 2021.1.5 + Wed, 06 Jan 2021 00:00:00 GMT Common:0,7,8,9:0 + 2 Gaku - http://tablacus.github.io/TablacusExplorerAddons/ + https://tablacus.github.io/TablacusExplorerAddons/ MIT License @@ -14,6 +15,6 @@ Sort tabs - タブのソート + タブをソート diff --git a/sorttabs/script.js b/sorttabs/script.js index bb8bec83..8b90e6f9 100644 --- a/sorttabs/script.js +++ b/sorttabs/script.js @@ -1,6 +1,5 @@ -var Addon_Id = "sorttabs"; - -var item = GetAddonElement(Addon_Id); +const Addon_Id = "sorttabs"; +const item = await GetAddonElement(Addon_Id); if (!item.getAttribute("Set")) { item.setAttribute("MenuExec", 1); item.setAttribute("Menu", "Tabs"); @@ -8,29 +7,41 @@ if (!item.getAttribute("Set")) { } if (window.Addon == 1) { Addons.SortTabs = { - strName: item.getAttribute("MenuName") || GetAddonInfo(Addon_Id).Name, - nPos: api.LowPart(item.getAttribute("MenuPos")), tid: {}, - Exec: function (Ctrl, pt) { - var FV = GetFolderView(Ctrl, pt); + Exec: async function (Ctrl, pt) { + const FV = await GetFolderView(Ctrl, pt); if (FV) { - var TC = FV.Parent; - if (Addons.SortTabs.tid[TC.id]) { - clearTimeout(Addons.SortTabs.tid[TC.id]); - delete Addons.SortTabs.tid[TC.id]; + const TC = await FV.Parent; + const Id = await TC.Id; + if (Addons.SortTabs.tid[Id]) { + clearTimeout(Addons.SortTabs.tid[Id]); + delete Addons.SortTabs.tid[Id]; + } + let ids = []; + const nCount = await TC.Count; + for (let i = 0; i < nCount; ++i) { + ids.push(TC[i].Id, TC[i].FolderItem); } - var ids = []; - for (var i = 0; i < TC.Count; i++) { - ids.push(TC[i].Id); + if (window.chrome) { + ids = await Promise.all(ids); } - ids.sort(function (a, b) { - return api.CompareIDs(0, te.Ctrl(CTRL_FV, a).FolderItem, te.Ctrl(CTRL_FV, b).FolderItem); - }); - for (var i = 0; i < TC.Count; i++) { - var j = te.Ctrl(CTRL_FV, ids[i]).Index; + for (let i = 0; i < nCount; ++i) { + for (let j = nCount - 1; j > i; --j) { + if (await api.CompareIDs(0, ids[j * 2 + 1], ids[j * 2 - 1]) < 0) { + const Id = ids[j * 2]; + ids[j * 2] = ids[j * 2 - 2]; + ids[j * 2- 2] = Id; + const pid = ids[j * 2 + 1]; + ids[j * 2 + 1] = ids[j * 2 - 1]; + ids[j * 2 - 1] = pid; + } + } + } + for (let i = 0; i < nCount; ++i) { + const j = await te.Ctrl(CTRL_FV, ids[i * 2]).Index; if (i != j) { - TC.Move(j, i); + await TC.Move(j, i); } } } @@ -38,32 +49,29 @@ if (window.Addon == 1) { }; if (item.getAttribute("Auto")) { - AddEvent("ChangeView", function (Ctrl) { - var TC = Ctrl.Parent; - if (Addons.SortTabs.tid[TC.id]) { - clearTimeout(Addons.SortTabs.tid[TC.id]); + AddEvent("ChangeView", async function (Ctrl) { + const TC = await Ctrl.Parent; + const Id = TC.Id; + if (Addons.SortTabs.tid[Id]) { + clearTimeout(Addons.SortTabs.tid[Id]); } - Addons.SortTabs.tid[TC.id] = setTimeout(function () { + Addons.SortTabs.tid[Id] = setTimeout(function (TC) { Addons.SortTabs.Exec(TC); - }, 99); + }, 99, TC); }); } //Menu if (item.getAttribute("MenuExec")) { - AddEvent(item.getAttribute("Menu"), function (Ctrl, hMenu, nPos) { - api.InsertMenu(hMenu, Addons.SortTabs.nPos, MF_BYPOSITION | MF_STRING, ++nPos, GetText(Addons.SortTabs.strName)); - ExtraMenuCommand[nPos] = Addons.SortTabs.Exec; - return nPos; - }); + SetMenuExec("SortTabs", item.getAttribute("MenuName") || await GetAddonInfo(Addon_Id).Name, item.getAttribute("Menu"), item.getAttribute("MenuPos")); } //Key if (item.getAttribute("KeyExec")) { - SetKeyExec(item.getAttribute("KeyOn"), item.getAttribute("Key"), Addons.SortTabs.Exec, "Func"); + SetKeyExec(item.getAttribute("KeyOn"), item.getAttribute("Key"), Addons.SortTabs.Exec, "Async"); } //Mouse if (item.getAttribute("MouseExec")) { - SetGestureExec(item.getAttribute("MouseOn"), item.getAttribute("Mouse"), Addons.SortTabs.Exec, "Func"); + SetGestureExec(item.getAttribute("MouseOn"), item.getAttribute("Mouse"), Addons.SortTabs.Exec, "Async"); } AddTypeEx("Add-ons", "Sort tabs", Addons.SortTabs.Exec); } else { diff --git a/teracopy/config.xml b/teracopy/config.xml index 50fc03d8..cb73da06 100644 --- a/teracopy/config.xml +++ b/teracopy/config.xml @@ -1,9 +1,9 @@ - 1.07 - 2020.12.16 - Fri, 18 Dec 2020 00:00:00 GMT + 1.08 + 2021.1.5 + Wed, 06 Jan 2021 00:00:00 GMT Common:0,1,2:0 2 Gaku diff --git a/teracopy/options.html b/teracopy/options.html index 190af819..a227075c 100644 --- a/teracopy/options.html +++ b/teracopy/options.html @@ -27,9 +27,9 @@
- + - +
@@ -41,7 +41,7 @@
- + - +
diff --git a/teracopy/options.js b/teracopy/options.js index e8ca290a..13a458ad 100644 --- a/teracopy/options.js +++ b/teracopy/options.js @@ -8,7 +8,7 @@ RefId = async function (o, s) { const dll = await ExtractPath(te, document.F["Path" + ui_.bit].value); const cls = document.F["Class" + ui_.bit].value; const item = await api.GetModuleFileName(null); - const ContextMenu = await api.ContextMenu(dll, cls, GetParentFolderName(item), item, HKEY_CLASSES_ROOT, "Folder", null); + const ContextMenu = await api.ContextMenu(dll, cls || ui_.bit < 64 ? "{A7005AF0-D6E8-48AF-8DFA-023B1CF660A7}" : "{A7645AF0-D6E8-48AF-8DFA-023B1CF660A7}", GetParentFolderName(item), item, HKEY_CLASSES_ROOT, "Folder", null); if (ContextMenu) { const hMenu = api.CreatePopupMenu(); ContextMenu.QueryContextMenu(hMenu, 0, 1, 0x7FFF, CMF_NORMAL); diff --git a/teracopy/sync.js b/teracopy/sync.js index d4008ff8..55200cff 100644 --- a/teracopy/sync.js +++ b/teracopy/sync.js @@ -6,8 +6,8 @@ Sync.TeraCopy = { NoTemp: item.getAttribute("NoTemp"), Copy: GetNum(item.getAttribute("Copy")), Move: GetNum(item.getAttribute("Move")), - Path: ExtractPath(item.getAttribute("Path" + (api.sizeof("HANDLE") * 8)) + ""), - Class: item.getAttribute("Class" + (api.sizeof("HANDLE") * 8)), + Path: ExtractPath(item.getAttribute("Path" + g_.bit) + ""), + Class: item.getAttribute("Class" + g_.bit) || g_.bit < 64 ? "{A7005AF0-D6E8-48AF-8DFA-023B1CF660A7}" : "{A7645AF0-D6E8-48AF-8DFA-023B1CF660A7}", FO: function (Ctrl, Items, Dest, grfKeyState, pt, pdwEffect, bOver) { if (Items.Count == 0 || !(grfKeyState & MK_LBUTTON)) {