├── .gitattributes
├── .gitignore
├── Buttons
├── CloseTabOrLister.js
├── EverythingSearch.zh-Hans.cmd.dcf
├── PasteInto.dcf
├── PasteInto.zh-Hans.dcf
├── SmartExtract.js
├── images
│ ├── EverythingSearch.zh-Hans.png
│ ├── PasteInto.png
│ ├── PasteInto.zh-Hans.png
│ ├── 控制面板-雨.png
│ └── 系统管理-雨.png
├── 控制面板-雨.cmd.dcf
└── 系统管理-雨.cmd.dcf
├── Commands
├── ClipEdit.js
├── GetColumnValue.ouc
├── Output.ouc
├── ReplacePath.ouc
├── Sleep.ouc
├── Speak.ouc
└── Speak.zh-Hans.ouc
├── LICENSE.txt
├── README.md
├── README.zh-Hans.md
├── Rename Scripts
├── EncodingConvert.js
├── PercentDecode.js
├── RandomString.js
├── images
│ └── EncodingConvert.zh-Hans.png
├── 中文数字转阿拉伯数字-WSQL.vbs
├── 中英混排加空格.js
├── 中英混排加空格
│ ├── C语言.txt
│ ├── Python开发.txt
│ ├── 《Python》.txt
│ ├── 精通 Python 开发.txt
│ ├── 精通Python.txt
│ ├── 精通Python开发.txt
│ └── 精通不了C++开发.txt
├── 简体中文转繁体.js
├── 繁体中文转简体.js
├── 阿拉伯数字转中文数字-WSQL.vbs
└── 阿拉伯数字转中文数字-无单位.js
└── Scripts
├── DialogJump.ahk
├── EventWatchers
├── OnActivateTab.js
├── OnAddColumns & OnScriptColumn.js
├── OnAvtivateLister.js
├── OnScriptColumn Measure.js
├── OnTabClick.js
└── OnViewerEvent.js
├── MaxViewerPane
├── .gitattributes
├── .gitignore
├── MaxViewerPane.cmd.dcf
├── MaxViewerPane.csproj
├── MaxViewerPane.js
├── MaxViewerPane.sln
├── NativeMethods.txt
├── Program.cs
└── images
│ ├── after.png
│ └── before.png
├── ObjectViewers
└── DOpus.js
├── OpenFileInWorkspace
├── OpenFileInWorkspace.bat
└── OpenFileInWorkspace.vbs
├── SizeColByEverything
├── DynamicWrapperX
│ ├── dynwrapx32.dll
│ └── dynwrapx64.dll
├── IPC
│ ├── Everything32.dll
│ └── Everything64.dll
├── Preview.png
├── README.zh-Hans.md
└── SizeColByEvetyhing.js
├── SmartThumbnailSize
├── SmartThumbnailSize.cmd.dop
├── SmartThumbnailSize.js
└── images
│ ├── after.png
│ ├── before.png
│ ├── dual.png
│ └── toolbar.png
└── TabColorizer
├── TabColorizer.js
└── images
├── after.png
└── before.png
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.ouc linguist-language=JS
2 | *.vbs.ouc linguist-language=VBScript
3 | *.cmd.ouc linguist-language=Batchfile
4 | *.dcf linguist-language=JS
5 | *.vbs.dcf linguist-language=VBScript
6 | *.cmd.dcf linguist-language=Batchfile
7 | *.dop linguist-language=JS
8 | *.vbs.dop linguist-language=VBScript
9 | *.cmd.dop linguist-language=Batchfile
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.exe
2 |
3 | private/
4 | *.private
5 | *.private.*
--------------------------------------------------------------------------------
/Buttons/CloseTabOrLister.js:
--------------------------------------------------------------------------------
1 | //CloseTabOrLister
2 | //Description: If there's only one tab, close the lister, otherwise close current tab. (This script is for reference only. Starting with DOpus v12.2.6, one can implement this feature by turning on "Lister closes when last tab closes" under `Preferences/Folder Tabs/Options`.)
3 | //Author: Chaoses Ib
4 | //Version: 231107
5 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
6 |
7 | function OnClick(clickData)
8 | {
9 | var cmd = clickData.func.command;
10 | var tab = clickData.func.sourcetab;
11 | if(tab.lister.tabs.count == 1)
12 | cmd.RunCommand("Close")
13 | else
14 | cmd.RunCommand("Go TABCLOSE")
15 | }
--------------------------------------------------------------------------------
/Buttons/EverythingSearch.zh-Hans.cmd.dcf:
--------------------------------------------------------------------------------
1 |
2 |
31 |
--------------------------------------------------------------------------------
/Buttons/PasteInto.dcf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Paste files into every selected folder
5 | #clippaste
6 |
7 | @script JScript
8 | // PasteInto
9 | // Author: @Chaoses-Ib, @Sanhuaitang
10 | // Version: 221010
11 | // Git: https://github.com/Chaoses-Ib/IbDOpusScripts
12 |
13 | function OnClick(clickData)
14 | {
15 | var cmd = clickData.func.command
16 | cmd.deselect = false
17 |
18 | var dirs = clickData.func.sourcetab.selected_dirs
19 | if (dirs.count == 0) {
20 | DOpus.Output("No folder selected")
21 | return
22 | }
23 | for (var e = new Enumerator(dirs); !e.atEnd(); e.moveNext()) {
24 | //DOpus.Output(e.item().realpath)
25 | cmd.SetSource(e.item().realpath) // Not Dest
26 | cmd.RunCommand("Clipboard PASTE")
27 | }
28 | }
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Buttons/PasteInto.zh-Hans.dcf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 将文件粘贴进选中的每个文件夹中
5 | #clippaste
6 |
7 | @script JScript
8 | // PasteInto
9 | // Author: @Chaoses-Ib, @Sanhuaitang
10 | // Version: 221010
11 | // Git: https://github.com/Chaoses-Ib/IbDOpusScripts
12 |
13 | function OnClick(clickData)
14 | {
15 | var cmd = clickData.func.command
16 | cmd.deselect = false
17 |
18 | var dirs = clickData.func.sourcetab.selected_dirs
19 | if (dirs.count == 0) {
20 | DOpus.Output("未选中文件夹")
21 | return
22 | }
23 | for (var e = new Enumerator(dirs); !e.atEnd(); e.moveNext()) {
24 | //DOpus.Output(e.item().realpath)
25 | cmd.SetSource(e.item().realpath) // Not Dest
26 | cmd.RunCommand("Clipboard PASTE")
27 | }
28 | }
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Buttons/SmartExtract.js:
--------------------------------------------------------------------------------
1 | @script jscript
2 | // SmartExtract
3 | // Description: Extract selected archive to subfolder if there's more than one file under the root path, otherwise (only one file) extract it directly.
4 | // Version: v0.3.1
5 | // Author: @Chaoses-Ib, @Sanhuaitang
6 | // Homepage: https://github.com/Chaoses-Ib/IbDOpusScripts
7 |
8 | // Select extracted file/directory after extraction. Enabled by default, change to `false` to disable.
9 | // 选中解压出的文件/目录。默认启用,改为 false 禁用
10 | var selectExtractedFiles = true;
11 |
12 | function OnClick(clickData)
13 | {
14 | var tab = clickData.func.sourcetab;
15 | var fsutil = DOpus.FSUtil;
16 | var cmd = clickData.func.command;
17 | var eSel = new Enumerator(tab.selected);
18 | if (selectExtractedFiles) {
19 | cmd.RunCommand("Select NONE");
20 | }
21 | for (; !eSel.atEnd(); eSel.moveNext())
22 | {
23 | var item = eSel.item();
24 |
25 | // There's no count field
26 | var count = 0;
27 | var firstName;
28 | for(var zipEnum = fsutil.ReadDir(item.RealPath); !zipEnum.complete;) {
29 | var zipItem = zipEnum.Next;
30 | if (count == 0) {
31 | firstName = zipItem.name;
32 | }
33 | if (++count >= 2)
34 | break;
35 | }
36 | // DOpus.Output(count);
37 | if (count == 0) {
38 | continue;
39 | }
40 |
41 | cmd.ClearFiles();
42 | cmd.AddFile(eSel.item());
43 |
44 | var c;
45 | var name;
46 | if (count < 2) {
47 | c = "Copy EXTRACT HERE";
48 | name = firstName;
49 | }
50 | else {
51 | c = "Copy EXTRACT=sub HERE";
52 | name = item.name_stem;
53 | }
54 | // DOpus.Output(name);
55 |
56 | if (selectExtractedFiles) {
57 | // c += " AUTOSELECT=yes";
58 | // Doesn't work
59 |
60 | cmd.AddLine(c);
61 | cmd.AddLine("Select EXACT \"" + name + "\"");
62 | cmd.Run();
63 | cmd.Clear();
64 | } else {
65 | cmd.RunCommand(c);
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/Buttons/images/EverythingSearch.zh-Hans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Buttons/images/EverythingSearch.zh-Hans.png
--------------------------------------------------------------------------------
/Buttons/images/PasteInto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Buttons/images/PasteInto.png
--------------------------------------------------------------------------------
/Buttons/images/PasteInto.zh-Hans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Buttons/images/PasteInto.zh-Hans.png
--------------------------------------------------------------------------------
/Buttons/images/控制面板-雨.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Buttons/images/控制面板-雨.png
--------------------------------------------------------------------------------
/Buttons/images/系统管理-雨.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Buttons/images/系统管理-雨.png
--------------------------------------------------------------------------------
/Buttons/控制面板-雨.cmd.dcf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #newmenu
5 |
6 |
7 | C:\Windows\System32\control.exe,0
8 |
9 | C:\Windows\System32\control.exe
10 |
11 |
12 |
13 |
14 | 打开系统属性面板
15 | sysdm.cpl,0
16 |
17 | sysdm.cpl
18 |
19 |
20 |
21 |
22 | 打开防火墙规则设置管理器
23 | %SystemRoot%\System32\AuthFWGP.dll,0
24 |
25 | wf.msc
26 |
27 |
28 |
29 |
30 | 打开添加/删除程序
31 | appwiz.cpl,0
32 |
33 | appwiz.cpl
34 |
35 |
36 |
37 |
38 | 打开账户设置面板UAC
39 | C:\Windows\System32\UserAccountControlSettings.exe,0
40 |
41 | UserAccountControlSettings.exe
42 |
43 |
44 |
45 |
46 | 打开计划任务设置管理器,安排自动运行的计算机任务。
47 | %windir%\system32\miguiresource.dll,1
48 |
49 | taskschd.msc
50 |
51 |
52 |
53 |
54 | mmsys.cpl,0
55 |
56 |
57 | 打开声音高级设置
58 | mmsys.cpl,0
59 |
60 | mmsys.cpl
61 |
62 |
63 |
64 |
65 | 音量合成器
66 | C:\Windows\System32\SndVol.exe,0
67 |
68 | SndVol
69 |
70 |
71 |
72 |
73 |
74 | 打开字体查看、删除等管理
75 | shell32.dll,73
76 |
77 | RUNDLL32 SHELL32.DLL,SHHelpShortcuts_RunDLL FontsFolder
78 |
79 |
80 |
81 |
82 | shell32.dll,82
83 |
84 |
85 | 打开打印机和传真机面板
86 | shell32.dll,82
87 |
88 | RUNDLL32 SHELL32.DLL,SHHelpShortcuts_RunDLL PrintersFolder
89 |
90 |
91 |
92 |
93 | 查看打印机的状态参数
94 | C:\WINDOWS\system32\printui.dll,0
95 |
96 | RUNDLL32 PRINTUI.DLL,PrintUIEntry /?
97 |
98 |
99 |
100 |
101 |
102 | 打开区域与语言设置面板
103 | intl.cpl,0
104 |
105 | intl.cpl
106 |
107 |
108 |
109 |
110 | 打开时间/日期管理
111 | timedate.cpl,0
112 |
113 | timedate.cpl
114 |
115 |
116 |
117 |
118 | 查看网络连接设备
119 | ncpa.cpl,0
120 |
121 | ncpa.cpl
122 |
123 |
124 |
125 |
126 | 打开鼠标设置面板
127 | main.cpl,0
128 |
129 | main.cpl
130 |
131 |
132 |
133 |
134 | 打开键盘属性面板
135 | main.cpl,7
136 |
137 | main.cpl @1
138 |
139 |
140 |
141 |
142 | 打开显示设置面板
143 | %windir%\system32\desk.cpl,0
144 |
145 | desk.cpl
146 |
147 |
148 |
149 |
150 | 添加删除蓝牙设备
151 | %windir%\system32\bthprops.cpl,2
152 |
153 | bthprops.cpl
154 |
155 |
156 |
157 |
158 | 设置常用文件的默认打开方式
159 | %windir%\system32\ComputerDefaults.exe,0
160 |
161 | ComputerDefaults.exe
162 |
163 |
164 |
165 |
166 | Windows 移动中心常用功能设置
167 | C:\Windows\System32\mblctr.exe,0
168 |
169 | mblctr
170 |
171 |
172 |
173 |
174 | 切换显示设备
175 | /system/DisplaySwitch.exe,6
176 |
177 | DisplaySwitch
178 |
179 |
180 |
181 |
182 | 打开游戏控制面板
183 | joy.cpl,0
184 |
185 | joy.cpl
186 |
187 |
188 |
189 |
190 | 打开轻松访问中心
191 | C:\Windows\System32\Utilman.exe,0
192 |
193 | Utilman.exe
194 |
195 |
196 |
197 |
198 | 打开屏幕放大器
199 | C:\Windows\System32\Magnify.exe,0
200 |
201 | Magnify
202 |
203 |
204 |
205 |
206 | 打开DirectX诊断工具
207 | C:\Windows\System32\dxdiag.exe,0
208 |
209 | dxdiag
210 |
211 |
212 |
213 |
214 | 打开InterNet属性面板
215 | inetcpl.cpl,27
216 |
217 | inetcpl.cpl
218 |
219 |
220 |
221 |
--------------------------------------------------------------------------------
/Buttons/系统管理-雨.cmd.dcf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #newmenu
5 |
6 |
7 | 打开组策略编辑器
8 | %windir%\system32\gpedit.dll,0
9 |
10 | gpedit.msc
11 |
12 |
13 |
14 |
15 | 管理磁盘以及使用其他系统工具来管理本地或远程计算机。
16 | %windir%\system32\Mycomput.dll,2
17 |
18 | compmgmt.msc /s
19 |
20 |
21 |
22 |
23 | 打开MSCONFIG高级疑难解答和系统配置
24 | %windir%\system32\msconfig.exe,0
25 |
26 | msconfig
27 |
28 |
29 |
30 |
31 | %windir%\system32\devmgr.dll,5
32 |
33 | devmgmt.msc
34 |
35 |
36 |
37 |
38 | %windir%\system32\shell32.dll,290
39 |
40 | diskmgmt.msc
41 |
42 |
43 |
44 |
45 | 查看和修改本地安全策略,如用户权限和审核策略。
46 | %windir%\system32\wsecedit.dll,0
47 |
48 | secpol.msc /s
49 |
50 |
51 |
52 |
53 | 打开服务管理器
54 | %windir%\system32\filemgmt.dll,0
55 |
56 | services.msc
57 |
58 |
59 |
60 |
61 | 打开组件、服务管理器
62 | %systemroot%\system32\comres.dll,0
63 |
64 | dcomcnfg
65 |
66 |
67 |
68 |
69 | 打开本地计算机事件查看管理器
70 | %windir%\system32\eventvwr.exe,0
71 |
72 | eventvwr
73 |
74 |
75 |
76 |
77 | 打开系统性能监视器,诊断性能问题并收集性能数据。
78 | %windir%\system32\wdc.dll,0
79 |
80 | perfmon.msc
81 |
82 |
83 |
84 |
85 | 打开系统资源监视器
86 | C:\Windows\System32\resmon.exe,0
87 |
88 | resmon.exe
89 |
90 |
91 |
92 |
93 | 在CMD窗口查看进程信息
94 | #cliadmin
95 |
96 | tasklist /SVC
97 | pause >nul
98 |
99 |
100 |
101 |
102 | %windir%\system32\certmgr.dll,3
103 |
104 | certmgr.msc
105 |
106 |
107 |
108 |
109 | 打开本地用户和组管理器
110 | %windir%\system32\shell32.dll,111
111 |
112 | lusrmgr.msc
113 |
114 |
115 |
116 |
117 | 打开用户账户设置
118 | %windir%\system32\shell32.dll,104
119 |
120 | control userpasswords2
121 |
122 |
123 |
124 |
125 | 查找用户、联系人及组
126 | %windir%\system32\shell32.dll,92
127 |
128 | RUNDLL32 dsquery,OpenQueryWindow
129 |
130 |
131 |
132 |
133 | 打开共享文件夹管理器
134 | %windir%\system32\shell32.dll,93
135 |
136 | fsmgmt.msc
137 |
138 |
139 |
140 |
141 | 打开远程桌面连接
142 | %windir%\system32\shell32.dll,94
143 |
144 | mstsc
145 |
146 |
147 |
148 |
149 | %windir%\system32\shell32.dll,90
150 |
151 | azman.msc
152 |
153 |
154 |
155 |
156 | 打开本地计算机的TMP管理器
157 | %windir%\system32\tpmcompc.dll,0
158 |
159 | tpm.msc
160 |
161 |
162 |
163 |
--------------------------------------------------------------------------------
/Commands/ClipEdit.js:
--------------------------------------------------------------------------------
1 | function OnInit(initData) {
2 | initData.name = 'ClipEdit';
3 | // initData.version = '2023-06-14';
4 | // initData.url = 'https://resource.dopus.com/t/clipedit-modify-the-clipboard/44636';
5 | initData.version = '0.2.1';
6 | initData.url = 'https://github.com/Chaoses-Ib/IbDOpusScripts';
7 | initData.desc = 'Modify the clipboard';
8 | initData.default_enable = true;
9 | initData.min_version = '12.0';
10 | initData.copyright = "lxp, Chaoses-Ib";
11 | }
12 |
13 | function OnAddCommands(addCmdData) {
14 | var cmd = addCmdData.AddCommand();
15 | cmd.name = 'ClipEdit';
16 | cmd.method = 'OnClipEdit';
17 | cmd.template = '' +
18 | 'alias/s,' +
19 | 'aliasexpand/s,' +
20 | 'envvar/s,' +
21 | 'envvarexpand/s,' +
22 | 'generic/s,' +
23 | 'isodate/s,' +
24 | 'log/s';
25 | cmd.hide = false;
26 | cmd.icon = 'script';
27 | }
28 |
29 | function OnClipEdit(scriptCmdData) {
30 | var cmd = scriptCmdData.func.command;
31 | var args = scriptCmdData.func.args;
32 | var fsu = DOpus.FSUtil();
33 | var wld = fsu.NewWild();
34 |
35 | cmd.deselect = false;
36 |
37 | if (DOpus.GetClipFormat() != 'text') return;
38 |
39 | var tmp = DOpus.GetClip();
40 | var vec = DOpus.Create().Vector();
41 |
42 | if (false);
43 | else if (args.alias) EditAlias();
44 | else if (args.aliasexpand) EditAliasExpand();
45 | else if (args.envvar) EditEnvvar();
46 | else if (args.envvarexpand) EditEnvvarExpand();
47 | else if (args.generic) EditGeneric();
48 | else if (args.isodate) EditIsodate();
49 |
50 | Log(tmp);
51 | DOpus.SetClip(tmp);
52 |
53 | // ====
54 |
55 | function EditAlias() {
56 | for (var e = new Enumerator(DOpus.aliases); !e.atEnd(); e.moveNext()) {
57 | var item = e.item();
58 |
59 | // Filter out long aliases
60 | if (item == 'homeroot' // C:\
61 | || item == 'programfiles' // C:\Program Files
62 | || item == 'programfilesx86' // C:\Program Files (x86)
63 | || item == 'commonappdata' // C:\ProgramData
64 | || item == 'windows' // C:\Windows
65 | || item == 'libraries' // lib://
66 | ) continue;
67 |
68 | // alias.path is undefined for `defaultright` and `lastright`
69 | if (item.path === undefined || item.path.drive == 0) continue; // we skip /trash etc.
70 | if (String(item) == 'altstartup') continue;
71 | if (String(item) == 'commonaltstartup') continue;
72 | if (String(item) == 'commonfavorites') continue;
73 | if (String(item) == 'commonprogramfiles') continue;
74 | if (String(item) == 'commonprogramfilesx86') continue;
75 | if (String(item) == 'desktopdir') continue;
76 | if (String(item) == 'hostdocuments') continue;
77 | if (String(item) == 'hostmusic') continue;
78 | if (String(item) == 'hostpictures') continue;
79 | if (String(item) == 'hostvideos') continue;
80 | if (String(item) == 'skydrive') continue;
81 | vec.push_back(item);
82 | }
83 |
84 | BubbleSort('/'); // bubble sort aliases by *path* length to achieve maximum replacement
85 |
86 | for (var e = new Enumerator(vec); !e.atEnd(); e.moveNext()) {
87 | var item = e.item();
88 | var re = new RegExp(wld.EscapeString(item.path, 'r'), 'gmi');
89 | var al = '/' + item;
90 | tmp = tmp.replace(re, al);
91 | }
92 | }
93 |
94 | function EditEnvvar() {
95 | // C:\ProgramData
96 | vec.push_back('%ALLUSERSPROFILE%');
97 | vec.push_back('%APPDATA%');
98 | vec.push_back('%CommonProgramFiles%');
99 | vec.push_back('%CommonProgramFiles(x86)%');
100 | vec.push_back('%ComSpec%');
101 | vec.push_back('%DriverData%');
102 | vec.push_back('%LOCALAPPDATA%');
103 | vec.push_back('%OneDrive%');
104 | // vec.push_back('%OneDriveConsumer%');
105 | vec.push_back('%ProgramData%');
106 | vec.push_back('%ProgramFiles%');
107 | vec.push_back('%ProgramFiles(x86)%');
108 | // vec.push_back('%ProgramW6432%');
109 | vec.push_back('%PUBLIC%');
110 | vec.push_back('%SystemRoot%');
111 | vec.push_back('%TEMP%');
112 | // vec.push_back('%TMP%');
113 | vec.push_back('%USERPROFILE%');
114 | vec.push_back('%windir%');
115 |
116 | BubbleSort(''); // bubble sort variables by *path* length to achieve maximum replacement
117 |
118 | for (var e = new Enumerator(vec); !e.atEnd(); e.moveNext()) {
119 | var item = e.item();
120 | var re = new RegExp(wld.EscapeString(fsu.Resolve(item), 'r'), 'gmi');
121 | var al = item;
122 | tmp = tmp.replace(re, al);
123 | }
124 | }
125 |
126 | function EditAliasExpand() {
127 | for (var e = new Enumerator(DOpus.aliases); !e.atEnd(); e.moveNext()) {
128 | var item = e.item();
129 | if (item.path.drive == 0) continue; // we skip /trash etc.
130 | vec.push_back(item);
131 | }
132 |
133 | BubbleSort(''); // bubble sort aliases by *name* length to achieve maximum replacement
134 |
135 | for (var e = new Enumerator(vec); !e.atEnd(); e.moveNext()) {
136 | var item = e.item();
137 | var re = new RegExp('/' + item, 'gmi');
138 | var al = fsu.Resolve('/' + item);
139 | tmp = tmp.replace(re, al);
140 | }
141 | }
142 |
143 | function EditEnvvarExpand() {
144 | vec.push_back('%ALLUSERSPROFILE%');
145 | vec.push_back('%APPDATA%');
146 | vec.push_back('%CommonProgramFiles%');
147 | vec.push_back('%CommonProgramFiles(x86)%');
148 | vec.push_back('%ComSpec%');
149 | vec.push_back('%DriverData%');
150 | vec.push_back('%LOCALAPPDATA%');
151 | vec.push_back('%OneDrive%');
152 | vec.push_back('%OneDriveConsumer%');
153 | vec.push_back('%ProgramData%');
154 | vec.push_back('%ProgramFiles%');
155 | vec.push_back('%ProgramFiles(x86)%');
156 | vec.push_back('%ProgramW6432%');
157 | vec.push_back('%PUBLIC%');
158 | vec.push_back('%SystemRoot%');
159 | vec.push_back('%TEMP%');
160 | vec.push_back('%TMP%');
161 | vec.push_back('%USERPROFILE%');
162 | vec.push_back('%windir%');
163 |
164 | // BubbleSort(''); // sorting not needed here
165 |
166 | for (var e = new Enumerator(vec); !e.atEnd(); e.moveNext()) {
167 | var item = e.item();
168 | var re = new RegExp(wld.EscapeString(item, 'r'), 'gmi');
169 | var al = fsu.Resolve(item);
170 | tmp = tmp.replace(re, al);
171 | }
172 | }
173 |
174 | function EditGeneric() {
175 | tmp = tmp.replace(/’|‘/gm, '\'');
176 | tmp = tmp.replace(/„|“|”|»|«/gm, '"');
177 | tmp = tmp.replace(/…/gm, '...');
178 | // tmp = tmp.replace(/,/gm, ' ');
179 | // tmp = tmp.replace(/(_|\')/gm, ' ');
180 | }
181 |
182 | function EditIsodate() {
183 | tmp = tmp.replace(/(\d|\d\d)\.(\d|\d\d)\.(19|20)(\d\d)/g, '$3$4-$2-$1');
184 | tmp = tmp.replace(/(19|20)(\d\d)-(\d)-(\d|\d\d)/g, '$1$2-0$3-$4');
185 | tmp = tmp.replace(/(19|20)(\d\d)-(\d\d)-(\d)(\D|$)/g, '$1$2-$3-0$4');
186 | }
187 |
188 | function BubbleSort(prefix) {
189 | for (var i = 0; i < vec.count - 1; i++) {
190 | for (var j = i + 1; j < vec.count; j++) {
191 | var k = String(fsu.Resolve(prefix + vec(i))).length;
192 | var l = String(fsu.Resolve(prefix + vec(j))).length;
193 | if (k >= l) continue;
194 | vec.exchange(i, j);
195 | }
196 | }
197 | }
198 |
199 | function Log(str) {
200 | if (args.log) {
201 | cmd.RunCommand('Set UTILITY=otherlog');
202 | DOpus.Output('\n' + str);
203 | }
204 | }
205 | }
--------------------------------------------------------------------------------
/Commands/GetColumnValue.ouc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Get the value of the specified column to glob:result
5 | COLUMN
6 | #usercommand
7 |
8 | // Author: @Chaoses-Ib
9 | // Version: 231101
10 | // Homepage: https://github.com/Chaoses-Ib/IbDOpusScripts
11 |
12 | // @set can't set an empty variable
13 | @set glob:result
14 | // SCRIPTARG doesn't work
15 | Rename PATTERN * TO "&COLUMN&"
16 | @script:jscript
17 | function OnGetNewName(getNewNameData)
18 | {
19 | if (!DOpus.vars.Exists("result"))
20 | DOpus.vars.Set("result", getNewNameData.newname);
21 | else
22 | DOpus.vars.Set("result", DOpus.vars.Get("result") + '\n' + getNewNameData.newname);
23 | return true; // prevent rename
24 | }
25 | // Access the result by `{$glob:result}`
26 | // Delete the result by `@set glob:result`
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Commands/Output.ouc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | TEXT/R
5 | #usercommand
6 |
7 | @script JScript
8 | // Output
9 | // e.g. Output "sourcepath: {sourcepath}"
10 | // Version: 211125
11 | // Repo: https://github.com/Chaoses-Ib/IbDOpusScripts
12 |
13 | function OnClick(clickData)
14 | {
15 | clickData.func.command.RunCommand("Set UTILITY=otherlog");
16 | DOpus.Output(clickData.func.args.TEXT);
17 | }
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Commands/ReplacePath.ouc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | PATTERN,TO/K,REGEXP/S
5 | #usercommand
6 |
7 | @script JScript
8 | // ReplacePath
9 | // Author: @Chaoses-Ib
10 | // Version: 220825
11 | // Homepage: https://github.com/Chaoses-Ib/IbDOpusScripts
12 |
13 | function OnClick(clickData)
14 | {
15 | var func = clickData.func;
16 | var tab = func.sourcetab;
17 | var path = String(tab.path).replace(func.args.REGEXP ? new RegExp(func.args.PATTERN) : func.args.PATTERN, func.args.TO);
18 | // tab.path.Set() and (tab.path = ...) do not work
19 | func.command.RunCommand('Go "' + path + '"')
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Commands/Sleep.ouc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Sleep for the specified milliseconds
5 | TIME
6 | #usercommand
7 |
8 | @script JScript
9 | // Version: 221130
10 | // Author: @Chaoses-Ib, @Sanhuaitang
11 | // Homepage: https://github.com/Chaoses-Ib/IbDOpusScripts
12 |
13 | function OnClick(clickData)
14 | {
15 | DOpus.Delay(clickData.func.args.TIME)
16 | }
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Commands/Speak.ouc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Text to speech
5 | TEXT/R
6 | #usercommand
7 |
8 | @script JScript
9 | // Version: 221021
10 | // Author: @Chaoses-Ib
11 | // HomePage: https://github.com/Chaoses-Ib/IbDOpusScripts
12 |
13 | function OnClick(clickData)
14 | {
15 | var v = new ActiveXObject("SAPI.SpVoice")
16 | v.speak(clickData.func.args.TEXT)
17 | }
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Commands/Speak.zh-Hans.ouc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 文本转语音
5 | TEXT/R
6 | #usercommand
7 |
8 | @script JScript
9 | // 版本:221021
10 | // 作者:@Chaoses-Ib
11 | // 主页:https://github.com/Chaoses-Ib/IbDOpusScripts
12 |
13 | function OnClick(clickData)
14 | {
15 | var v = new ActiveXObject("SAPI.SpVoice")
16 | v.speak(clickData.func.args.TEXT)
17 | }
18 |
19 |
20 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Chaoses-Ib
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # IbDOpusScripts
2 | Languages: [English](README.md), [简体中文](README.zh-Hans.md)
3 |
4 | Some scripts for [Directory Opus](https://www.gpsoft.com.au/) ([中文介绍](https://github.com/Chaoses-Ib/DirectoryOpus)).
5 |
6 | ## Buttons
7 | - [SmartExtract](Buttons/SmartExtract.js)
8 |
9 | Extract selected archive to subfolder if there's more than one file under the root path, otherwise (only one file) extract it directly.
10 | - Support multiple selection
11 | - Support selecting extracted file/directory after extraction
12 |
13 | - [Everything 搜索](Buttons/EverythingSearch.zh-Hans.cmd.dcf)
14 |
15 | 
16 |
17 | 通过 [Everything](https://www.voidtools.com/) 在当前文件夹下搜索文件。
18 |
19 | 在首次使用时需要先点击“设置 Everything 路径”进行初始化。默认热键 Ctrl+E。
20 |
21 | - [控制面板-雨](Buttons/控制面板-雨.cmd.dcf)
22 |
23 | 
24 |
25 | 作者:雨浪飘零
26 |
27 | - [PasteInto](Buttons/PasteInto.dcf)
28 |
29 | 
30 |
31 | Paste files into every selected folder.
32 |
33 | - [系统管理-雨](Buttons/系统管理-雨.cmd.dcf)
34 |
35 | 
36 |
37 | 作者:雨浪飘零
38 |
39 | - ~~[CloseTabOrLister](Buttons/CloseTabOrLister.js)~~ (built-in since DOpus v12.2.6)
40 |
41 | If there's only one tab, close the lister, otherwise close current tab. (This script is for reference only. Starting with DOpus v12.2.6, this feature can be implemented by turning on "Lister closes when last tab closes" under `Preferences/Folder Tabs/Options`.)
42 |
43 | ## Commands
44 | - [ClipEdit](Commands/ClipEdit.js)
45 |
46 | A forked version of [ClipEdit](https://resource.dopus.com/t/clipedit-modify-the-clipboard/44636?u=chaoses-ib) to fix some problems.
47 |
48 | - [GetColumnValue](Commands/GetColumnValue.ouc)
49 |
50 | Get the value of the specified column to `glob:result`.
51 |
52 | For example:
53 |
54 | - Copy files' names and MD5 to clipboard
55 |
56 | ```cmd
57 | // The syntax is the same as the "New name" in the Advanced Rename dialog
58 | GetColumnValue "* {md5sum}"
59 | Clipboard SET {$glob:result}
60 | @set glob:result
61 | ```
62 | Corresponding result:
63 | ```
64 | .gitignore 3b121da4db64aa59864e9ed46fa68d0a
65 | LICENSE.txt dda85d3253cbd75fd74cceb14c1d8b02
66 | ```
67 | - Archive files with the name of the parent folder
68 |
69 | ```cmd
70 | GetColumnValue "{parent}"
71 | Copy ADDTOARCHIVE CREATEFOLDER="{$glob:result}" HERE
72 | @set glob:result
73 | ```
74 |
75 | `@set glob:result` is used to clear the result. It is optional but recommended.
76 |
77 | - [Output](Commands/Output.ouc)
78 |
79 | Output text to script log.
80 |
81 | e.g. `Output "sourcepath: {sourcepath}"`
82 |
83 | - [ReplacePath](Commands/ReplacePath.ouc)
84 |
85 | Replace the current path.
86 |
87 | Switch between the same folders under C drive and D drive:
88 | ```cmd
89 | @ifpath:C:\*
90 | ReplacePath C:\ TO D:\
91 | @ifpath:D:\*
92 | ReplacePath D:\ TO C:\
93 | ```
94 |
95 | Switch between `Program Files` and `Program Files (x86)`:
96 | ```cmd
97 | @ifpath:*\Program Files(\*|)
98 | ReplacePath "\Program Files" TO "\Program Files (x86)"
99 | @ifpath:*\Program Files '(x86')(\*|)
100 | ReplacePath "\Program Files (x86)" TO "\Program Files"
101 | ```
102 |
103 | - [Sleep](Commands/Sleep.ouc)
104 |
105 | Sleep for the specified milliseconds.
106 |
107 | e.g. `Sleep 3000`
108 |
109 | - [Speak](Commands/Speak.ouc)
110 |
111 | Text to speech.
112 |
113 | e.g. `Speak "My Moon My Man"`
114 |
115 | ## Scripts
116 | To use a script, you need to download it and put it into `/dopusdata\Script AddIns` (except for DialogJump).
117 |
118 | - [DialogJump](Scripts/DialogJump.ahk)
119 |
120 | When in the editor of the file dialog, press Ctrl+G to jump to the last activated folder of listers. If Ctrl+G does not work, type "//cur " to trigger it. (Download the executable file from [Releases](https://github.com/Chaoses-Ib/IbDOpusScripts/releases) if you do not have [AutoHotkey v2](https://www.autohotkey.com/v2/))
121 |
122 | - [EventWatchers](Scripts/EventWatchers)
123 |
124 | Output script event information when the event is triggered.
125 |
126 | - [MaxViewerPane](Scripts/MaxViewerPane/MaxViewerPane.js)
127 |
128 | Maximize the viewer pane.
129 |
130 | Before | After
131 | --- | ---
132 |  | 
133 |
134 | This script requires a supporting executable `MaxViewerPane.exe`. You need to download the archive from [Releases](https://github.com/Chaoses-Ib/IbDOpusScripts/releases) and extract the folder next to the script (i.e. there should exist `/dopusdata\Script AddIns\MaxViewerPane\MaxViewerPane.exe`).
135 |
136 | Button: [MaxViewerPane.dcf](Scripts/MaxViewerPane/MaxViewerPane.cmd.dcf)
137 |
138 | - [ObjectViewers](Scripts/ObjectViewers)
139 |
140 | Output script object information.
141 |
142 | - [SmartThumbnailSize](Scripts/SmartThumbnailSize/SmartThumbnailSize.js)
143 |
144 | Automatically adjust the thumbnail ratio according to the images in the folder or the selected images.
145 |
146 | Before | After
147 | --- | ---
148 |  | 
149 |
150 | You can set the thumbnail to specified size by running a command like `SmartThumbnailSize SIZE=256`.
151 |
152 | You can also import [the toolbar](Scripts/SmartThumbnailSize/SmartThumbnailSize.cmd.dop):
153 |
154 | 
155 |
156 | Note that `SmartThumbnailSize` will only set the thumbnail size for the current file diaplay. This means that you can use it to set separate thumbnail sizes for each file display in a dual-display Lister:
157 |
158 | 
159 |
160 | - [TabColorizer](Scripts/TabColorizer/TabColorizer.js)
161 |
162 | Colorize the folder tab with the color of its label.
163 |
164 | Before | After
165 | --- | ---
166 |  | 
167 |
168 | - ~~[SizeColByEverything](Scripts/SizeColByEverything/README.zh-Hans.md)~~ (built-in since DOpus v13)
169 |
170 | Add a size column which retrieves sizes of files and folders from Everything. (This script is for reference only. Use [IbDOpusExt](https://github.com/Chaoses-Ib/IbDOpusExt)'s Size column instead.)
171 |
172 | Non-DOpus scripts:
173 | - [OpenFileInWorkspace](Scripts/OpenFileInWorkspace)
174 |
175 | Given a file path, open its parent folder (or Git root) and show the file in VS Code.
176 |
177 | [Download](https://github.com/Chaoses-Ib/IbDOpusScripts/releases)
178 |
179 | To associate file types with this script, change their `open` action to `wscript "...\OpenFileInWorkspace.vbs" "%1"`, where `...\OpenFileInWorkspace.vbs` should be the absolute path to `OpenFileInWorkspace.vbs`.
180 |
181 | Can also be combined with [ObsidianShell](https://github.com/Chaoses-Ib/ObsidianShell) to try to open notes in Obsidian first and then fallback to VS Code workspace.
182 |
183 | ## Rename Scripts
184 | - [PercentDecode](Rename%20Scripts/PercentDecode.js)
185 |
186 | Decode percent-encoding (URL encoding). For example, `%E4%BD%A0%E5%A5%BD` and `%u4F60%u597D` can be decoded to `你好`.
187 |
188 | - [RandomString](Rename%20Scripts/RandomString.js)
189 |
190 | Replace `{randomString}` in the new name to random strings.
191 |
192 | - [EncodingConvert](Rename%20Scripts/EncodingConvert.js)
193 |
194 | Mainly used to fix the character encoding of filenames. For example, you can fix the GBK-encoded `嬻偺嫬奅 椉媀幃` to Shift-JIS-encoded `空の境界 両儀式`.
195 |
196 | 
197 |
198 | Support UTF-8, GBK, Big5, Shift-JIS and EUC-KR encodings.
199 |
200 | - [繁体中文转简体](Rename%20Scripts/繁体中文转简体.js)
201 |
202 | 例如将 `邊緣行者` 转换为 `边缘行者`。
203 |
204 | - [简体中文转繁体](Rename%20Scripts/简体中文转繁体.js)
205 |
206 | 例如将 `边缘行者` 转换为 `邊緣行者`。
207 |
208 | - [中文数字转阿拉伯数字-WSQL](Rename%20Scripts/中文数字转阿拉伯数字-WSQL.vbs)
209 |
210 | 例如将 `一百二十三` 转换为 `123`。支持大写数字。
211 |
212 | - [阿拉伯数字转中文数字-WSQL](Rename%20Scripts/阿拉伯数字转中文数字-WSQL.vbs)
213 |
214 | 例如将 `123` 转换为 `一百二十三`。支持大写数字。
215 |
216 | - [阿拉伯数字转中文数字-无单位](Rename%20Scripts/阿拉伯数字转中文数字-无单位.js)
217 |
218 | 例如将 `123` 转换为 `一二三`。支持大写数字。
219 |
220 | - [中英混排加空格](Rename%20Scripts/中英混排加空格.js)
221 |
222 | 在汉字和英文单词之间添加空格,例如将 `你好world` 转换为 `你好 world`。
223 |
224 | ## See Also
225 | - [Telegram group](https://t.me/IbDirectoryOpusGroup)
226 | - [IbDOpusExt](https://github.com/Chaoses-Ib/IbDOpusExt)
227 | - [laoqiuqiu/DOpus-Script](https://github.com/laoqiuqiu/DOpus-Script)
--------------------------------------------------------------------------------
/README.zh-Hans.md:
--------------------------------------------------------------------------------
1 | # IbDOpusScripts
2 | 语言:[English](README.md),[简体中文](README.zh-Hans.md)
3 |
4 | 一些 [Directory Opus](https://github.com/Chaoses-Ib/DirectoryOpus) 的脚本。
5 |
6 | ## 按钮
7 | - [SmartExtract](Buttons/SmartExtract.js)(智能解压)
8 |
9 | 对于选中的压缩包,当压缩包根目录下只含有一个文件/目录时直接解压,否则解压到同名文件夹。
10 | - 支持多选
11 | - 支持选中解压出的文件/文件夹
12 |
13 | - [Everything 搜索](Buttons/EverythingSearch.zh-Hans.cmd.dcf)
14 |
15 | 
16 |
17 | 通过 [Everything](https://www.voidtools.com/) 在当前文件夹下搜索文件。
18 |
19 | 在首次使用时需要先点击“设置 Everything 路径”进行初始化。默认热键 Ctrl+E。
20 |
21 | - [控制面板-雨](Buttons/控制面板-雨.cmd.dcf)
22 |
23 | 
24 |
25 | 作者:雨浪飘零
26 |
27 | - [PasteInto](Buttons/PasteInto.zh-Hans.dcf)
28 |
29 | 
30 |
31 | 将文件粘贴进选中的每个文件夹中。
32 |
33 | - [系统管理-雨](Buttons/系统管理-雨.cmd.dcf)
34 |
35 | 
36 |
37 | 作者:雨浪飘零
38 |
39 | - ~~[CloseTabOrLister](Buttons/CloseTabOrLister.js)(关闭标签页)~~(DOpus v12.2.6 已内置)
40 |
41 | 关闭当前标签页,如果只剩一个,就直接关闭窗口。(只作参考用途。从 DOpus v12.2.6 开始,可以通过勾选 `配置/文件夹标签/选项` 下的“关闭最后一个标签时同时关闭窗口”来实现该功能。)
42 |
43 | ## 命令
44 | - [ClipEdit](Commands/ClipEdit.js)
45 |
46 | [ClipEdit](https://resource.dopus.com/t/clipedit-modify-the-clipboard/44636?u=chaoses-ib) 的修改版,修复了一些问题。
47 |
48 | - [GetColumnValue](Commands/GetColumnValue.ouc)(获取列值)
49 |
50 | 获取指定列的值到 `glob:result`。
51 |
52 | 例子:
53 | - 复制文件的文件名和 MD5 到剪切板
54 |
55 | ```cmd
56 | // 语法与重命名对话框中的“新名称”相同
57 | GetColumnValue "* {md5sum}"
58 | Clipboard SET {$glob:result}
59 | @set glob:result
60 | ```
61 | 对应结果:
62 | ```
63 | .gitignore 3b121da4db64aa59864e9ed46fa68d0a
64 | LICENSE.txt dda85d3253cbd75fd74cceb14c1d8b02
65 | ```
66 |
67 | - 压缩文件,使用父文件夹作为压缩包名称
68 |
69 | ```cmd
70 | GetColumnValue "{parent}"
71 | Copy ADDTOARCHIVE CREATEFOLDER="{$glob:result}" HERE
72 | @set glob:result
73 | ```
74 |
75 | `@set glob:result` 用于清除结果,可以省略,但是推荐使用。
76 |
77 | - [Output](Commands/Output.ouc)(输出)
78 |
79 | 输出文本到脚本日志。
80 |
81 | 例如:`Output "sourcepath: {sourcepath}"`
82 |
83 | - [ReplacePath](Commands/ReplacePath.ouc)(替换路径)
84 |
85 | 替换当前路径。
86 |
87 | 在C盘和D盘下的相同文件夹间切换:
88 | ```cmd
89 | @ifpath:C:\*
90 | ReplacePath C:\ TO D:\
91 | @ifpath:D:\*
92 | ReplacePath D:\ TO C:\
93 | ```
94 |
95 | 在 `Program Files` 和 `Program Files (x86)` 之间切换:
96 | ```cmd
97 | @ifpath:*\Program Files(\*|)
98 | ReplacePath "\Program Files" TO "\Program Files (x86)"
99 | @ifpath:*\Program Files '(x86')(\*|)
100 | ReplacePath "\Program Files (x86)" TO "\Program Files"
101 | ```
102 |
103 | - [Sleep](Commands/Sleep.ouc)
104 |
105 | 休眠指定的毫秒时间。
106 |
107 | 例如:`Sleep 3000`
108 |
109 | - [说](Commands/Speak.zh-Hans.ouc)([Speak](Commands/Speak.ouc))
110 |
111 | 文本转语音。
112 |
113 | 例如:`说 "荒耶 所求为何"`
114 |
115 | ## 脚本
116 | 要使用一个脚本,你需要将它下载到 `/dopusdata\Script AddIns`(除了 DialogJump)。
117 |
118 | - [DialogJump](Scripts/DialogJump.ahk)(对话框跳转)
119 |
120 | 在文件对话框编辑框中按 Ctrl+G 跳转到 DOpus 最近激活的文件夹。Ctrl+G 无效时可以输入“//cur ”来触发。(如果没有 [AutoHotkey v2](https://www.autohotkey.com/v2/) 的话可以从 [Releases](https://github.com/Chaoses-Ib/IbDOpusScripts/releases) 下载可执行文件)
121 |
122 | - [EventWatchers](Scripts/EventWatchers)(查看脚本事件)
123 |
124 | 触发脚本事件时输出事件信息。
125 |
126 | - [MaxViewerPane](Scripts/MaxViewerPane/MaxViewerPane.js)
127 |
128 | 最大化查看器窗格。
129 |
130 | 使用前 | 使用后
131 | --- | ---
132 |  | 
133 |
134 | 该脚本需要一个配套的可执行文件 `MaxViewerPane.exe`。你需要从 [Releases](https://github.com/Chaoses-Ib/IbDOpusScripts/releases) 下载压缩包,并将文件夹解压到脚本旁(即应该存在 `/dopusdata\Script AddIns\MaxViewerPane\MaxViewerPane.exe`)。
135 |
136 | 按钮:[MaxViewerPane.dcf](Scripts/MaxViewerPane/MaxViewerPane.cmd.dcf)
137 |
138 | - [ObjectViewers](Scripts/ObjectViewers)(查看脚本对象)
139 |
140 | 输出脚本对象信息。
141 |
142 | - [SmartThumbnailSize](Scripts/SmartThumbnailSize/SmartThumbnailSize.js)
143 |
144 | 根据文件夹中的图片或选中的图片自动调整缩略图比例。
145 |
146 | 使用前 | 使用后
147 | --- | ---
148 |  | 
149 |
150 | 你可以通过运行类似 `SmartThumbnailSize SIZE=256` 的命令来将缩略图设置为指定尺寸。
151 |
152 | 你也可以导入[工具栏](Scripts/SmartThumbnailSize/SmartThumbnailSize.cmd.dop):
153 |
154 | 
155 |
156 | 注意,`SmartThumbnailSize` 仅会设置当前文件列表的缩略图尺寸。这意味着你可以用它来在一个双栏窗口中为每个文件列表分别设置不同的缩略图尺寸:
157 |
158 | 
159 |
160 | - [TabColorizer](Scripts/TabColorizer/TabColorizer.js)
161 |
162 | 使用文件夹标记的颜色对文件夹标签进行染色。
163 |
164 | 使用前 | 使用后
165 | --- | ---
166 |  | 
167 |
168 | - ~~[SizeColByEverything](Scripts/SizeColByEverything/README.zh-Hans.md)(Ev 尺寸列)~~(DOpus v13 已内置)
169 |
170 | 为 DO 添加一个 Size 列,通过 Everything 获取文件和文件夹的大小。(只作参考用途,请使用 [IbDOpusExt](https://github.com/Chaoses-Ib/IbDOpusExt) 的尺寸列替代。)
171 |
172 | 非 DOpus 脚本:
173 | - [OpenFileInWorkspace](Scripts/OpenFileInWorkspace)
174 |
175 | 给定一个文件路径,在 VS Code 中打开它的父文件夹(或 Git 根目录)并显示该文件。
176 |
177 | [下载](https://github.com/Chaoses-Ib/IbDOpusScripts/releases)
178 |
179 | 要将文件类型关联到这个脚本,需要将它们的 `open` 动作改为 `wscript "...\OpenFileInWorkspace.vbs" "%1"`,其中 `...\OpenFileInWorkspace.vbs` 应为 `OpenFileInWorkspace.vbs` 的绝对路径。
180 |
181 | 也可以与 [ObsidianShell](https://github.com/Chaoses-Ib/ObsidianShell) 结合使用,在打开笔记时先尝试在 Obsidian 中打开,再回落到 VS Code 工作区。
182 |
183 | ## 重命名脚本
184 | - [PercentDecode](Rename%20Scripts/PercentDecode.js)(百分号解码)
185 |
186 | 解码百分号编码(URL编码),例如将 `%E4%BD%A0%E5%A5%BD` 和 `%u4F60%u597D` 解码为 `你好`。
187 |
188 | - [RandomString](Rename%20Scripts/RandomString.js)(随机文本)
189 |
190 | 替换新名称中的 `{randomString}` 为随机文本。
191 |
192 | - [EncodingConvert](Rename%20Scripts/EncodingConvert.js)(编码转换)
193 |
194 | 主要用于修复文件名乱码,例如将 GBK 编码的 `嬻偺嫬奅 椉媀幃` 修复为 Shift-JIS 编码的 `空の境界 両儀式`。
195 |
196 | 
197 |
198 | 支持 UTF-8、GBK、Big5、Shift-JIS 和 EUC-KR 编码。
199 |
200 | - [繁体中文转简体](Rename%20Scripts/繁体中文转简体.js)
201 |
202 | 例如将 `邊緣行者` 转换为 `边缘行者`。
203 |
204 | - [简体中文转繁体](Rename%20Scripts/简体中文转繁体.js)
205 |
206 | 例如将 `边缘行者` 转换为 `邊緣行者`。
207 |
208 | - [中文数字转阿拉伯数字-WSQL](Rename%20Scripts/中文数字转阿拉伯数字-WSQL.vbs)
209 |
210 | 例如将 `一百二十三` 转换为 `123`。支持大写数字。
211 |
212 | - [阿拉伯数字转中文数字-WSQL](Rename%20Scripts/阿拉伯数字转中文数字-WSQL.vbs)
213 |
214 | 例如将 `123` 转换为 `一百二十三`。支持大写数字。
215 |
216 | - [阿拉伯数字转中文数字-无单位](Rename%20Scripts/阿拉伯数字转中文数字-无单位.js)
217 |
218 | 例如将 `123` 转换为 `一二三`。支持大写数字。
219 |
220 | - [中英混排加空格](Rename%20Scripts/中英混排加空格.js)
221 |
222 | 在汉字和英文单词之间添加空格,例如将 `你好world` 转换为 `你好 world`。
223 |
224 | ## 相关推荐
225 | - [Telegram 群组](https://t.me/IbDirectoryOpusGroup)
226 | - [IbDOpusExt](https://github.com/Chaoses-Ib/IbDOpusExt)
227 | - [laoqiuqiu/DOpus-Script](https://github.com/laoqiuqiu/DOpus-Script)
--------------------------------------------------------------------------------
/Rename Scripts/EncodingConvert.js:
--------------------------------------------------------------------------------
1 | // EncodingConvert
2 | // Authors: @Chaoses-Ib, @laoqiuqiu
3 | // Version: 220619.2
4 | // Homepage: https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | // Use in command:
7 | // Rename PRESET="EncodingConvert" SCRIPTARG srcEncoding:1 dstEncoding:3
8 |
9 | var encodings = ['utf-8', 'gbk', 'big5', 'shift-jis', 'euc-kr'];
10 |
11 | function OnGetNewName(getNewNameData)
12 | {
13 | return encodingConvert(encodings[getNewNameData.custom.srcEncoding], encodings[getNewNameData.custom.dstEncoding], getNewNameData.newname);
14 | }
15 |
16 | function OnGetCustomFields(getFieldData)
17 | {
18 | // Default: gbk, shift-jis
19 | srcCombo = DOpus.Create.Vector(1, DOpus.strings.Get('utf-8'), DOpus.strings.Get('gbk'), DOpus.strings.Get('big5'), DOpus.strings.Get('shift-jis'), DOpus.strings.Get('euc-kr'));
20 | getFieldData.fields.srcEncoding = srcCombo;
21 | getFieldData.field_labels('srcEncoding') = DOpus.strings.Get('srcEncoding');
22 |
23 | dstCombo = DOpus.Create().Vector(srcCombo);
24 | dstCombo(0) = 3;
25 | getFieldData.fields.dstEncoding = dstCombo;
26 | getFieldData.field_labels('dstEncoding') = DOpus.strings.Get('dstEncoding');
27 | }
28 |
29 | function encodingConvert(srcEncoding, dstEncoding, string) {
30 | // Encodings: https://docs.microsoft.com/en-us/previous-versions/exchange-server/exchange-10/ms526296(v=exchg.10)
31 |
32 | var stream = new ActiveXObject('Adodb.Stream');
33 | stream.Open();
34 | stream.Charset = srcEncoding;
35 | stream.WriteText(string);
36 | stream.Position = 0;
37 | stream.Charset = dstEncoding;
38 | var result = stream.ReadText();
39 | stream.Close();
40 | return result;
41 | }
42 |
43 | ==SCRIPT RESOURCES
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/Rename Scripts/PercentDecode.js:
--------------------------------------------------------------------------------
1 | // PercentDecode
2 | // Description: Decode percent-encoding (URL encoding).
3 | // Author: @Chaoses-Ib
4 | // Version: 221107
5 | // Homepage: https://github.com/Chaoses-Ib/IbDOpusScripts
6 |
7 | function OnGetCustomFields(getFieldData)
8 | {
9 | getFieldData.fields.replaceAtWithPercentU = true
10 | getFieldData.field_labels('replaceAtWithPercentU') = DOpus.strings.Get('replaceAtWithPercentU')
11 | }
12 |
13 | function OnGetNewName(getNewNameData)
14 | {
15 | var s = getNewNameData.newname_stem_m;
16 |
17 | if (getNewNameData.custom.replaceAtWithPercentU)
18 | s = s.replace(/@([0-9a-fA-F])/g, '%u$1');
19 |
20 | if (s.indexOf('%u') != -1)
21 | return unescape(s);
22 | else
23 | return decodeURIComponent(s);
24 | }
25 |
26 | ==SCRIPT RESOURCES
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Rename Scripts/RandomString.js:
--------------------------------------------------------------------------------
1 | // RandomString
2 | // Description: Replace `{randomString}` in the new name to random strings.
3 | // Author: @Chaoses-Ib
4 | // Version: 231121
5 | // Homepage: https://github.com/Chaoses-Ib/IbDOpusScripts
6 |
7 | function OnGetNewName(getNewNameData)
8 | {
9 | return getNewNameData.newname_stem_m.
10 | replace(/\{randomString\}/g, function() {
11 | // 8 is the length of the random string
12 | return randomString62(8)
13 | })
14 | + getNewNameData.newname_ext_m
15 | }
16 |
17 | function randomString62(len){
18 | // Chars used to generate the random string
19 | var table = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
20 | var str = ""
21 | for (i = 0; i < len; i++){
22 | str += table.charAt(randomInt(0, table.length - 1))
23 | }
24 | return str
25 | }
26 |
27 | function randomInt(min, max){
28 | return Math.round(min + Math.random() * (max - min)) // Not max-min+1
29 | }
--------------------------------------------------------------------------------
/Rename Scripts/images/EncodingConvert.zh-Hans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Rename Scripts/images/EncodingConvert.zh-Hans.png
--------------------------------------------------------------------------------
/Rename Scripts/中文数字转阿拉伯数字-WSQL.vbs:
--------------------------------------------------------------------------------
1 | ' 中文数字转阿拉伯数字-WSQL(中文改数字)
2 | ' 将中文读法改成阿拉伯数字,如一百二十三改成123,四十五改成45
3 | ' 作者:WSQL, @laoqiuqiu, @Chaoses-Ib
4 | ' 版本:220620.2
5 | ' 主页:https://github.com/Chaoses-Ib/IbDOpusScripts
6 |
7 | Function OnGetCustomFields(ByRef getFieldData)
8 | '@Chaoses-Ib
9 | getFieldData.Fields.onlyFirstNum = True
10 | getFieldData.field_labels("onlyFirstNum") = "只转换第一段数字"
11 | End Function
12 |
13 | Function OnGetNewName(ByRef getNewNameData)
14 | Set item = getNewNameData.Item
15 | newName = item.name_stem
16 |
17 | '正则表达式判断是不是中文读法,不够严谨
18 | Dim reg
19 | Set reg = CreateObject("vbscript.regexp")
20 | reg.Pattern = "[一二三四五六七八九十百千万零]{1,}" '正则表达式
21 | reg.Global = not getNewNameData.custom.onlyFirstNum
22 |
23 | Set matches = reg.Execute(newName)
24 | For Each match In matches
25 | newName = Replace(newName, match.Value, ConverToDigit(match.Value))
26 | Next
27 | OnGetNewName = newName & item.ext
28 | End Function
29 |
30 | '将单个文字转换成数字
31 | Function ToDigit(cn)
32 | Number = 0
33 | Select Case cn
34 | Case "壹", "一"
35 | Number = 1
36 | Case "两", "贰", "二"
37 | Number = 2
38 | Case "叁", "三"
39 | Number = 3
40 | Case "肆", "四"
41 | Number = 4
42 | Case "伍", "五"
43 | Number = 5
44 | Case "陆", "六"
45 | Number = 6
46 | Case "柒", "七"
47 | Number = 7
48 | Case "捌", "八"
49 | Number = 8
50 | Case "玖", "九"
51 | Number = 9
52 | Case "拾", "十"
53 | Number = 10
54 | Case "佰", "百"
55 | Number = 100
56 | Case "仟", "千"
57 | Number = 1000
58 | Case "萬"
59 | Case "万"
60 | Number = 10000
61 | Case "零"
62 | Case Else
63 | Number = 0
64 | End Select
65 | ToDigit = Number
66 | End Function
67 |
68 | '转成成阿拉伯数字
69 | Function ConverToDigit(cnNumber)
70 | result = 0
71 | temp = 0
72 | cnNumber = FixChs(cnNumber)
73 | For c = 1 To len(cnNumber)
74 | temp2 = Mid(cnNumber, c, 1)
75 | temp1 = ToDigit(temp2)
76 | If temp1 = 10000 Then
77 | result = result + temp
78 | result = result * 10000
79 | temp = 0
80 | ElseIf temp1 > 9 Then
81 | If temp1 = 10 And temp = 0 Then
82 | temp = 1
83 | End If
84 | result = result + temp * temp1
85 | temp = 0
86 | Else
87 | temp = temp1
88 | End If
89 | Next
90 | result = result + temp
91 | ConverToDigit = result
92 | End Function
93 |
94 | '修正二百五,三万三的情况
95 | '@laoqiuqiu
96 | Function FixChs(cnNumber)
97 | Dim LU, SLU
98 | LU = ToDigit(Right(cnNumber,1))
99 | SLU = ToDigit(Left(Right(cnNumber,2),1))
100 | FixChs = cnNumber
101 | If (SLU > 10) And (LU < 10) Then
102 | Select Case SLU
103 | Case 100 : FixChs = cnNumber & "十"
104 | Case 1000 : FixChs = cnNumber & "百"
105 | Case 10000 : FixChs = cnNumber & "千"
106 | Case 100000000 : FixChs = cnNumber & "千万"
107 | End Select
108 | End If
109 | End Function
--------------------------------------------------------------------------------
/Rename Scripts/中英混排加空格.js:
--------------------------------------------------------------------------------
1 | // 中英混排加空格
2 | // 在汉字和英文单词间添加空格
3 | // 作者:混沌 Ib
4 | // 版本:211030
5 | // 仓库:https://github.com/Chaoses-Ib/IbDOpusScripts
6 |
7 | function OnGetNewName(getNewNameData)
8 | {
9 | var name = getNewNameData.newname_stem_m
10 |
11 | var dict = [ '[a-z\\-0-9]{2}', 'C\\+\\+', '[CF]#' ]
12 | for (var i = 0; i < dict.length; i++) {
13 | name = name.replace(new RegExp('([〇㐀-鿭-礼])(' + dict[i] + ')', 'ig'), '$1 $2')
14 | name = name.replace(new RegExp(dict[i] + '(?=[〇㐀-鿭-礼])', 'ig'), '$& ')
15 | }
16 |
17 | return name + getNewNameData.newname_ext_m
18 | }
--------------------------------------------------------------------------------
/Rename Scripts/中英混排加空格/C语言.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Rename Scripts/中英混排加空格/C语言.txt
--------------------------------------------------------------------------------
/Rename Scripts/中英混排加空格/Python开发.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Rename Scripts/中英混排加空格/Python开发.txt
--------------------------------------------------------------------------------
/Rename Scripts/中英混排加空格/《Python》.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Rename Scripts/中英混排加空格/《Python》.txt
--------------------------------------------------------------------------------
/Rename Scripts/中英混排加空格/精通 Python 开发.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Rename Scripts/中英混排加空格/精通 Python 开发.txt
--------------------------------------------------------------------------------
/Rename Scripts/中英混排加空格/精通Python.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Rename Scripts/中英混排加空格/精通Python.txt
--------------------------------------------------------------------------------
/Rename Scripts/中英混排加空格/精通Python开发.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Rename Scripts/中英混排加空格/精通Python开发.txt
--------------------------------------------------------------------------------
/Rename Scripts/中英混排加空格/精通不了C++开发.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Rename Scripts/中英混排加空格/精通不了C++开发.txt
--------------------------------------------------------------------------------
/Rename Scripts/简体中文转繁体.js:
--------------------------------------------------------------------------------
1 | // 简体中文转繁体
2 | // 版本:221013
3 | // 作者:@Chaoses-Ib, @Sanhuaitang
4 | // 仓库:https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | cn = '万与丑专业丛东丝丢两严丧个丬丰临为丽举么义乌乐乔习乡书买乱争于亏云亘亚产亩亲亵亸亿仅从仑仓仪们价众优伙会伛伞伟传伤伥伦伧伪伫体余佣佥侠侣侥侦侧侨侩侪侬俣俦俨俩俪俭债倾偬偻偾偿傥傧储傩儿兑兖党兰关兴兹养兽冁内冈册写军农冢冯冲决况冻净凄凉凌减凑凛几凤凫凭凯击凼凿刍划刘则刚创删别刬刭刽刿剀剂剐剑剥剧劝办务劢动励劲劳势勋勐勚匀匦匮区医华协单卖卢卤卧卫却卺厂厅历厉压厌厍厕厢厣厦厨厩厮县参叆叇双发变叙叠叶号叹叽吁后吓吕吗吣吨听启吴呒呓呕呖呗员呙呛呜咏咔咙咛咝咤咴咸哌响哑哒哓哔哕哗哙哜哝哟唛唝唠唡唢唣唤唿啧啬啭啮啰啴啸喷喽喾嗫呵嗳嘘嘤嘱噜噼嚣嚯团园囱围囵国图圆圣圹场坂坏块坚坛坜坝坞坟坠垄垅垆垒垦垧垩垫垭垯垱垲垴埘埙埚埝埯堑堕塆墙壮声壳壶壸处备复够头夸夹夺奁奂奋奖奥妆妇妈妩妪妫姗姜娄娅娆娇娈娱娲娴婳婴婵婶媪嫒嫔嫱嬷孙学孪宁宝实宠审宪宫宽宾寝对寻导寿将尔尘尧尴尸尽层屃屉届属屡屦屿岁岂岖岗岘岙岚岛岭岳岽岿峃峄峡峣峤峥峦崂崃崄崭嵘嵚嵛嵝嵴巅巩巯币帅师帏帐帘帜带帧帮帱帻帼幂幞干并广庄庆庐庑库应庙庞废庼廪开异弃张弥弪弯弹强归当录彟彦彻径徕御忆忏忧忾怀态怂怃怄怅怆怜总怼怿恋恳恶恸恹恺恻恼恽悦悫悬悭悯惊惧惨惩惫惬惭惮惯愍愠愤愦愿慑慭憷懑懒懔戆戋戏戗战戬户扎扑扦执扩扪扫扬扰抚抛抟抠抡抢护报担拟拢拣拥拦拧拨择挂挚挛挜挝挞挟挠挡挢挣挤挥挦捞损捡换捣据捻掳掴掷掸掺掼揸揽揿搀搁搂搅携摄摅摆摇摈摊撄撑撵撷撸撺擞攒敌敛数斋斓斗斩断无旧时旷旸昙昼昽显晋晒晓晔晕晖暂暧札术朴机杀杂权条来杨杩杰极构枞枢枣枥枧枨枪枫枭柜柠柽栀栅标栈栉栊栋栌栎栏树栖样栾桊桠桡桢档桤桥桦桧桨桩梦梼梾检棂椁椟椠椤椭楼榄榇榈榉槚槛槟槠横樯樱橥橱橹橼檐檩欢欤欧歼殁殇残殒殓殚殡殴毁毂毕毙毡毵氇气氢氩氲汇汉污汤汹沓沟没沣沤沥沦沧沨沩沪沵泞泪泶泷泸泺泻泼泽泾洁洒洼浃浅浆浇浈浉浊测浍济浏浐浑浒浓浔浕涂涌涛涝涞涟涠涡涢涣涤润涧涨涩淀渊渌渍渎渐渑渔渖渗温游湾湿溃溅溆溇滗滚滞滟滠满滢滤滥滦滨滩滪漤潆潇潋潍潜潴澜濑濒灏灭灯灵灾灿炀炉炖炜炝点炼炽烁烂烃烛烟烦烧烨烩烫烬热焕焖焘煅煳熘爱爷牍牦牵牺犊犟状犷犸犹狈狍狝狞独狭狮狯狰狱狲猃猎猕猡猪猫猬献獭玑玙玚玛玮环现玱玺珉珏珐珑珰珲琎琏琐琼瑶瑷璇璎瓒瓮瓯电画畅畲畴疖疗疟疠疡疬疮疯疱疴痈痉痒痖痨痪痫痴瘅瘆瘗瘘瘪瘫瘾瘿癞癣癫癯皑皱皲盏盐监盖盗盘眍眦眬着睁睐睑瞒瞩矫矶矾矿砀码砖砗砚砜砺砻砾础硁硅硕硖硗硙硚确硷碍碛碜碱碹磙礼祎祢祯祷祸禀禄禅离秃秆种积称秽秾稆税稣稳穑穷窃窍窑窜窝窥窦窭竖竞笃笋笔笕笺笼笾筑筚筛筜筝筹签简箓箦箧箨箩箪箫篑篓篮篱簖籁籴类籼粜粝粤粪粮糁糇紧絷纟纠纡红纣纤纥约级纨纩纪纫纬纭纮纯纰纱纲纳纴纵纶纷纸纹纺纻纼纽纾线绀绁绂练组绅细织终绉绊绋绌绍绎经绐绑绒结绔绕绖绗绘给绚绛络绝绞统绠绡绢绣绤绥绦继绨绩绪绫绬续绮绯绰绱绲绳维绵绶绷绸绹绺绻综绽绾绿缀缁缂缃缄缅缆缇缈缉缊缋缌缍缎缏缐缑缒缓缔缕编缗缘缙缚缛缜缝缞缟缠缡缢缣缤缥缦缧缨缩缪缫缬缭缮缯缰缱缲缳缴缵罂网罗罚罢罴羁羟羡翘翙翚耢耧耸耻聂聋职聍联聩聪肃肠肤肷肾肿胀胁胆胜胧胨胪胫胶脉脍脏脐脑脓脔脚脱脶脸腊腌腘腭腻腼腽腾膑臜舆舣舰舱舻艰艳艹艺节芈芗芜芦苁苇苈苋苌苍苎苏苘苹茎茏茑茔茕茧荆荐荙荚荛荜荞荟荠荡荣荤荥荦荧荨荩荪荫荬荭荮药莅莜莱莲莳莴莶获莸莹莺莼萚萝萤营萦萧萨葱蒇蒉蒋蒌蓝蓟蓠蓣蓥蓦蔷蔹蔺蔼蕲蕴薮藁藓虏虑虚虫虬虮虽虾虿蚀蚁蚂蚕蚝蚬蛊蛎蛏蛮蛰蛱蛲蛳蛴蜕蜗蜡蝇蝈蝉蝎蝼蝾螀螨蟏衅衔补衬衮袄袅袆袜袭袯装裆裈裢裣裤裥褛褴襁襕见观觃规觅视觇览觉觊觋觌觍觎觏觐觑觞触觯詟誉誊讠计订讣认讥讦讧讨让讪讫训议讯记讱讲讳讴讵讶讷许讹论讻讼讽设访诀证诂诃评诅识诇诈诉诊诋诌词诎诏诐译诒诓诔试诖诗诘诙诚诛诜话诞诟诠诡询诣诤该详诧诨诩诪诫诬语诮误诰诱诲诳说诵诶请诸诹诺读诼诽课诿谀谁谂调谄谅谆谇谈谊谋谌谍谎谏谐谑谒谓谔谕谖谗谘谙谚谛谜谝谞谟谠谡谢谣谤谥谦谧谨谩谪谫谬谭谮谯谰谱谲谳谴谵谶谷豮贝贞负贠贡财责贤败账货质贩贪贫贬购贮贯贰贱贲贳贴贵贶贷贸费贺贻贼贽贾贿赀赁赂赃资赅赆赇赈赉赊赋赌赍赎赏赐赑赒赓赔赕赖赗赘赙赚赛赜赝赞赟赠赡赢赣赪赵赶趋趱趸跃跄跖跞践跶跷跸跹跻踊踌踪踬踯蹑蹒蹰蹿躏躜躯车轧轨轩轪轫转轭轮软轰轱轲轳轴轵轶轷轸轹轺轻轼载轾轿辀辁辂较辄辅辆辇辈辉辊辋辌辍辎辏辐辑辒输辔辕辖辗辘辙辚辞辩辫边辽达迁过迈运还这进远违连迟迩迳迹适选逊递逦逻遗遥邓邝邬邮邹邺邻郁郄郏郐郑郓郦郧郸酝酦酱酽酾酿释里鉅鉴銮錾钆钇针钉钊钋钌钍钎钏钐钑钒钓钔钕钖钗钘钙钚钛钝钞钟钠钡钢钣钤钥钦钧钨钩钪钫钬钭钮钯钰钱钲钳钴钵钶钷钸钹钺钻钼钽钾钿铀铁铂铃铄铅铆铈铉铊铋铍铎铏铐铑铒铕铗铘铙铚铛铜铝铞铟铠铡铢铣铤铥铦铧铨铪铫铬铭铮铯铰铱铲铳铴铵银铷铸铹铺铻铼铽链铿销锁锂锃锄锅锆锇锈锉锊锋锌锍锎锏锐锑锒锓锔锕锖锗错锚锜锞锟锠锡锢锣锤锥锦锨锩锫锬锭键锯锰锱锲锳锴锵锶锷锸锹锺锻锼锽锾锿镀镁镂镃镆镇镈镉镊镌镍镎镏镐镑镒镕镖镗镙镚镛镜镝镞镟镠镡镢镣镤镥镦镧镨镩镪镫镬镭镮镯镰镱镲镳镴镶长门闩闪闫闬闭问闯闰闱闲闳间闵闶闷闸闹闺闻闼闽闾闿阀阁阂阃阄阅阆阇阈阉阊阋阌阍阎阏阐阑阒阓阔阕阖阗阘阙阚阛队阳阴阵阶际陆陇陈陉陕陧陨险随隐隶隽难雏雠雳雾霁霉霭靓静靥鞑鞒鞯鞴韦韧韨韩韪韫韬韵页顶顷顸项顺须顼顽顾顿颀颁颂颃预颅领颇颈颉颊颋颌颍颎颏颐频颒颓颔颕颖颗题颙颚颛颜额颞颟颠颡颢颣颤颥颦颧风飏飐飑飒飓飔飕飖飗飘飙飚飞飨餍饤饥饦饧饨饩饪饫饬饭饮饯饰饱饲饳饴饵饶饷饸饹饺饻饼饽饾饿馀馁馂馃馄馅馆馇馈馉馊馋馌馍馎馏馐馑馒馓馔馕马驭驮驯驰驱驲驳驴驵驶驷驸驹驺驻驼驽驾驿骀骁骂骃骄骅骆骇骈骉骊骋验骍骎骏骐骑骒骓骔骕骖骗骘骙骚骛骜骝骞骟骠骡骢骣骤骥骦骧髅髋髌鬓魇魉鱼鱽鱾鱿鲀鲁鲂鲄鲅鲆鲇鲈鲉鲊鲋鲌鲍鲎鲏鲐鲑鲒鲓鲔鲕鲖鲗鲘鲙鲚鲛鲜鲝鲞鲟鲠鲡鲢鲣鲤鲥鲦鲧鲨鲩鲪鲫鲬鲭鲮鲯鲰鲱鲲鲳鲴鲵鲶鲷鲸鲹鲺鲻鲼鲽鲾鲿鳀鳁鳂鳃鳄鳅鳆鳇鳈鳉鳊鳋鳌鳍鳎鳏鳐鳑鳒鳓鳔鳕鳖鳗鳘鳙鳛鳜鳝鳞鳟鳠鳡鳢鳣鸟鸠鸡鸢鸣鸤鸥鸦鸧鸨鸩鸪鸫鸬鸭鸮鸯鸰鸱鸲鸳鸴鸵鸶鸷鸸鸹鸺鸻鸼鸽鸾鸿鹀鹁鹂鹃鹄鹅鹆鹇鹈鹉鹊鹋鹌鹍鹎鹏鹐鹑鹒鹓鹔鹕鹖鹗鹘鹚鹛鹜鹝鹞鹟鹠鹡鹢鹣鹤鹥鹦鹧鹨鹩鹪鹫鹬鹭鹯鹰鹱鹲鹳鹴鹾麦麸黄黉黡黩黪黾鼋鼌鼍鼗鼹齄齐齑齿龀龁龂龃龄龅龆龇龈龉龊龋龌龙龚龛龟志制咨只里系范松没尝尝闹面准钟别闲干尽脏拼';
7 | t = '萬與醜專業叢東絲丟兩嚴喪個爿豐臨為麗舉麼義烏樂喬習鄉書買亂爭於虧雲亙亞產畝親褻嚲億僅從侖倉儀們價眾優夥會傴傘偉傳傷倀倫傖偽佇體餘傭僉俠侶僥偵側僑儈儕儂俁儔儼倆儷儉債傾傯僂僨償儻儐儲儺兒兌兗黨蘭關興茲養獸囅內岡冊寫軍農塚馮衝決況凍淨淒涼淩減湊凜幾鳳鳧憑凱擊氹鑿芻劃劉則剛創刪別剗剄劊劌剴劑剮劍剝劇勸辦務勱動勵勁勞勢勳猛勩勻匭匱區醫華協單賣盧鹵臥衛卻巹廠廳曆厲壓厭厙廁廂厴廈廚廄廝縣參靉靆雙發變敘疊葉號歎嘰籲後嚇呂嗎唚噸聽啟吳嘸囈嘔嚦唄員咼嗆嗚詠哢嚨嚀噝吒噅鹹呱響啞噠嘵嗶噦嘩噲嚌噥喲嘜嗊嘮啢嗩唕喚呼嘖嗇囀齧囉嘽嘯噴嘍嚳囁嗬噯噓嚶囑嚕劈囂謔團園囪圍圇國圖圓聖壙場阪壞塊堅壇壢壩塢墳墜壟壟壚壘墾坰堊墊埡墶壋塏堖塒塤堝墊垵塹墮壪牆壯聲殼壺壼處備複夠頭誇夾奪奩奐奮獎奧妝婦媽嫵嫗媯姍薑婁婭嬈嬌孌娛媧嫻嫿嬰嬋嬸媼嬡嬪嬙嬤孫學孿寧寶實寵審憲宮寬賓寢對尋導壽將爾塵堯尷屍盡層屭屜屆屬屢屨嶼歲豈嶇崗峴嶴嵐島嶺嶽崠巋嶨嶧峽嶢嶠崢巒嶗崍嶮嶄嶸嶔崳嶁脊巔鞏巰幣帥師幃帳簾幟帶幀幫幬幘幗冪襆幹並廣莊慶廬廡庫應廟龐廢廎廩開異棄張彌弳彎彈強歸當錄彠彥徹徑徠禦憶懺憂愾懷態慫憮慪悵愴憐總懟懌戀懇惡慟懨愷惻惱惲悅愨懸慳憫驚懼慘懲憊愜慚憚慣湣慍憤憒願懾憖怵懣懶懍戇戔戲戧戰戩戶紮撲扡執擴捫掃揚擾撫拋摶摳掄搶護報擔擬攏揀擁攔擰撥擇掛摯攣掗撾撻挾撓擋撟掙擠揮撏撈損撿換搗據撚擄摑擲撣摻摜摣攬撳攙擱摟攪攜攝攄擺搖擯攤攖撐攆擷擼攛擻攢敵斂數齋斕鬥斬斷無舊時曠暘曇晝曨顯晉曬曉曄暈暉暫曖劄術樸機殺雜權條來楊榪傑極構樅樞棗櫪梘棖槍楓梟櫃檸檉梔柵標棧櫛櫳棟櫨櫟欄樹棲樣欒棬椏橈楨檔榿橋樺檜槳樁夢檮棶檢欞槨櫝槧欏橢樓欖櫬櫚櫸檟檻檳櫧橫檣櫻櫫櫥櫓櫞簷檁歡歟歐殲歿殤殘殞殮殫殯毆毀轂畢斃氈毿氌氣氫氬氳彙漢汙湯洶遝溝沒灃漚瀝淪滄渢溈滬濔濘淚澩瀧瀘濼瀉潑澤涇潔灑窪浹淺漿澆湞溮濁測澮濟瀏滻渾滸濃潯濜塗湧濤澇淶漣潿渦溳渙滌潤澗漲澀澱淵淥漬瀆漸澠漁瀋滲溫遊灣濕潰濺漵漊潷滾滯灩灄滿瀅濾濫灤濱灘澦濫瀠瀟瀲濰潛瀦瀾瀨瀕灝滅燈靈災燦煬爐燉煒熗點煉熾爍爛烴燭煙煩燒燁燴燙燼熱煥燜燾煆糊溜愛爺牘犛牽犧犢強狀獷獁猶狽麅獮獰獨狹獅獪猙獄猻獫獵獼玀豬貓蝟獻獺璣璵瑒瑪瑋環現瑲璽瑉玨琺瓏璫琿璡璉瑣瓊瑤璦璿瓔瓚甕甌電畫暢佘疇癤療瘧癘瘍鬁瘡瘋皰屙癰痙癢瘂癆瘓癇癡癉瘮瘞瘺癟癱癮癭癩癬癲臒皚皺皸盞鹽監蓋盜盤瞘眥矓著睜睞瞼瞞矚矯磯礬礦碭碼磚硨硯碸礪礱礫礎硜矽碩硤磽磑礄確鹼礙磧磣堿镟滾禮禕禰禎禱禍稟祿禪離禿稈種積稱穢穠穭稅穌穩穡窮竊竅窯竄窩窺竇窶豎競篤筍筆筧箋籠籩築篳篩簹箏籌簽簡籙簀篋籜籮簞簫簣簍籃籬籪籟糴類秈糶糲粵糞糧糝餱緊縶糸糾紆紅紂纖紇約級紈纊紀紉緯紜紘純紕紗綱納紝縱綸紛紙紋紡紵紖紐紓線紺絏紱練組紳細織終縐絆紼絀紹繹經紿綁絨結絝繞絰絎繪給絢絳絡絕絞統綆綃絹繡綌綏絛繼綈績緒綾緓續綺緋綽緔緄繩維綿綬繃綢綯綹綣綜綻綰綠綴緇緙緗緘緬纜緹緲緝縕繢緦綞緞緶線緱縋緩締縷編緡緣縉縛縟縝縫縗縞纏縭縊縑繽縹縵縲纓縮繆繅纈繚繕繒韁繾繰繯繳纘罌網羅罰罷羆羈羥羨翹翽翬耮耬聳恥聶聾職聹聯聵聰肅腸膚膁腎腫脹脅膽勝朧腖臚脛膠脈膾髒臍腦膿臠腳脫腡臉臘醃膕齶膩靦膃騰臏臢輿艤艦艙艫艱豔艸藝節羋薌蕪蘆蓯葦藶莧萇蒼苧蘇檾蘋莖蘢蔦塋煢繭荊薦薘莢蕘蓽蕎薈薺蕩榮葷滎犖熒蕁藎蓀蔭蕒葒葤藥蒞蓧萊蓮蒔萵薟獲蕕瑩鶯蓴蘀蘿螢營縈蕭薩蔥蕆蕢蔣蔞藍薊蘺蕷鎣驀薔蘞藺藹蘄蘊藪槁蘚虜慮虛蟲虯蟣雖蝦蠆蝕蟻螞蠶蠔蜆蠱蠣蟶蠻蟄蛺蟯螄蠐蛻蝸蠟蠅蟈蟬蠍螻蠑螿蟎蠨釁銜補襯袞襖嫋褘襪襲襏裝襠褌褳襝褲襇褸襤繈襴見觀覎規覓視覘覽覺覬覡覿覥覦覯覲覷觴觸觶讋譽謄訁計訂訃認譏訐訌討讓訕訖訓議訊記訒講諱謳詎訝訥許訛論訩訟諷設訪訣證詁訶評詛識詗詐訴診詆謅詞詘詔詖譯詒誆誄試詿詩詰詼誠誅詵話誕詬詮詭詢詣諍該詳詫諢詡譸誡誣語誚誤誥誘誨誑說誦誒請諸諏諾讀諑誹課諉諛誰諗調諂諒諄誶談誼謀諶諜謊諫諧謔謁謂諤諭諼讒諮諳諺諦謎諞諝謨讜謖謝謠謗諡謙謐謹謾謫譾謬譚譖譙讕譜譎讞譴譫讖穀豶貝貞負貟貢財責賢敗賬貨質販貪貧貶購貯貫貳賤賁貰貼貴貺貸貿費賀貽賊贄賈賄貲賃賂贓資賅贐賕賑賚賒賦賭齎贖賞賜贔賙賡賠賧賴賵贅賻賺賽賾贗讚贇贈贍贏贛赬趙趕趨趲躉躍蹌蹠躒踐躂蹺蹕躚躋踴躊蹤躓躑躡蹣躕躥躪躦軀車軋軌軒軑軔轉軛輪軟轟軲軻轤軸軹軼軤軫轢軺輕軾載輊轎輈輇輅較輒輔輛輦輩輝輥輞輬輟輜輳輻輯轀輸轡轅轄輾轆轍轔辭辯辮邊遼達遷過邁運還這進遠違連遲邇逕跡適選遜遞邐邏遺遙鄧鄺鄔郵鄒鄴鄰鬱郤郟鄶鄭鄆酈鄖鄲醞醱醬釅釃釀釋裏钜鑒鑾鏨釓釔針釘釗釙釕釷釺釧釤鈒釩釣鍆釹鍚釵鈃鈣鈈鈦鈍鈔鍾鈉鋇鋼鈑鈐鑰欽鈞鎢鉤鈧鈁鈥鈄鈕鈀鈺錢鉦鉗鈷缽鈳鉕鈽鈸鉞鑽鉬鉭鉀鈿鈾鐵鉑鈴鑠鉛鉚鈰鉉鉈鉍鈹鐸鉶銬銠鉺銪鋏鋣鐃銍鐺銅鋁銱銦鎧鍘銖銑鋌銩銛鏵銓鉿銚鉻銘錚銫鉸銥鏟銃鐋銨銀銣鑄鐒鋪鋙錸鋱鏈鏗銷鎖鋰鋥鋤鍋鋯鋨鏽銼鋝鋒鋅鋶鐦鐧銳銻鋃鋟鋦錒錆鍺錯錨錡錁錕錩錫錮鑼錘錐錦鍁錈錇錟錠鍵鋸錳錙鍥鍈鍇鏘鍶鍔鍤鍬鍾鍛鎪鍠鍰鎄鍍鎂鏤鎡鏌鎮鎛鎘鑷鐫鎳鎿鎦鎬鎊鎰鎔鏢鏜鏍鏰鏞鏡鏑鏃鏇鏐鐔钁鐐鏷鑥鐓鑭鐠鑹鏹鐙鑊鐳鐶鐲鐮鐿鑔鑣鑞鑲長門閂閃閆閈閉問闖閏闈閑閎間閔閌悶閘鬧閨聞闥閩閭闓閥閣閡閫鬮閱閬闍閾閹閶鬩閿閽閻閼闡闌闃闠闊闋闔闐闒闕闞闤隊陽陰陣階際陸隴陳陘陝隉隕險隨隱隸雋難雛讎靂霧霽黴靄靚靜靨韃鞽韉韝韋韌韍韓韙韞韜韻頁頂頃頇項順須頊頑顧頓頎頒頌頏預顱領頗頸頡頰頲頜潁熲頦頤頻頮頹頷頴穎顆題顒顎顓顏額顳顢顛顙顥纇顫顬顰顴風颺颭颮颯颶颸颼颻飀飄飆飆飛饗饜飣饑飥餳飩餼飪飫飭飯飲餞飾飽飼飿飴餌饒餉餄餎餃餏餅餑餖餓餘餒餕餜餛餡館餷饋餶餿饞饁饃餺餾饈饉饅饊饌饢馬馭馱馴馳驅馹駁驢駔駛駟駙駒騶駐駝駑駕驛駘驍罵駰驕驊駱駭駢驫驪騁驗騂駸駿騏騎騍騅騌驌驂騙騭騤騷騖驁騮騫騸驃騾驄驏驟驥驦驤髏髖髕鬢魘魎魚魛魢魷魨魯魴魺鮁鮃鯰鱸鮋鮓鮒鮊鮑鱟鮍鮐鮭鮚鮳鮪鮞鮦鰂鮜鱠鱭鮫鮮鮺鯗鱘鯁鱺鰱鰹鯉鰣鰷鯀鯊鯇鮶鯽鯒鯖鯪鯕鯫鯡鯤鯧鯝鯢鯰鯛鯨鯵鯴鯔鱝鰈鰏鱨鯷鰮鰃鰓鱷鰍鰒鰉鰁鱂鯿鰠鼇鰭鰨鰥鰩鰟鰜鰳鰾鱈鱉鰻鰵鱅鰼鱖鱔鱗鱒鱯鱤鱧鱣鳥鳩雞鳶鳴鳲鷗鴉鶬鴇鴆鴣鶇鸕鴨鴞鴦鴒鴟鴝鴛鴬鴕鷥鷙鴯鴰鵂鴴鵃鴿鸞鴻鵐鵓鸝鵑鵠鵝鵒鷳鵜鵡鵲鶓鵪鶤鵯鵬鵮鶉鶊鵷鷫鶘鶡鶚鶻鶿鶥鶩鷊鷂鶲鶹鶺鷁鶼鶴鷖鸚鷓鷚鷯鷦鷲鷸鷺鸇鷹鸌鸏鸛鸘鹺麥麩黃黌黶黷黲黽黿鼂鼉鞀鼴齇齊齏齒齔齕齗齟齡齙齠齜齦齬齪齲齷龍龔龕龜誌製谘隻裡係範鬆冇嚐嘗鬨麵準鐘彆閒乾儘臟拚';
8 |
9 | function cn2t(str) {
10 | var newStr = '';
11 | for(var i = 0; i < str.length; i++) {
12 | var index = cn.indexOf(str[i]);
13 | newStr += index == -1 ? str[i] : t[index];
14 | }
15 | return newStr;
16 | }
17 |
18 | function OnGetNewName(getNewNameData)
19 | {
20 | return cn2t(getNewNameData.newname);
21 | }
--------------------------------------------------------------------------------
/Rename Scripts/繁体中文转简体.js:
--------------------------------------------------------------------------------
1 | // 繁体中文转简体
2 | // 版本:221013
3 | // 作者:@Chaoses-Ib, @Sanhuaitang
4 | // 仓库:https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | cn = '万与丑专业丛东丝丢两严丧个丬丰临为丽举么义乌乐乔习乡书买乱争于亏云亘亚产亩亲亵亸亿仅从仑仓仪们价众优伙会伛伞伟传伤伥伦伧伪伫体余佣佥侠侣侥侦侧侨侩侪侬俣俦俨俩俪俭债倾偬偻偾偿傥傧储傩儿兑兖党兰关兴兹养兽冁内冈册写军农冢冯冲决况冻净凄凉凌减凑凛几凤凫凭凯击凼凿刍划刘则刚创删别刬刭刽刿剀剂剐剑剥剧劝办务劢动励劲劳势勋勐勚匀匦匮区医华协单卖卢卤卧卫却卺厂厅历厉压厌厍厕厢厣厦厨厩厮县参叆叇双发变叙叠叶号叹叽吁后吓吕吗吣吨听启吴呒呓呕呖呗员呙呛呜咏咔咙咛咝咤咴咸哌响哑哒哓哔哕哗哙哜哝哟唛唝唠唡唢唣唤唿啧啬啭啮啰啴啸喷喽喾嗫呵嗳嘘嘤嘱噜噼嚣嚯团园囱围囵国图圆圣圹场坂坏块坚坛坜坝坞坟坠垄垅垆垒垦垧垩垫垭垯垱垲垴埘埙埚埝埯堑堕塆墙壮声壳壶壸处备复够头夸夹夺奁奂奋奖奥妆妇妈妩妪妫姗姜娄娅娆娇娈娱娲娴婳婴婵婶媪嫒嫔嫱嬷孙学孪宁宝实宠审宪宫宽宾寝对寻导寿将尔尘尧尴尸尽层屃屉届属屡屦屿岁岂岖岗岘岙岚岛岭岳岽岿峃峄峡峣峤峥峦崂崃崄崭嵘嵚嵛嵝嵴巅巩巯币帅师帏帐帘帜带帧帮帱帻帼幂幞干并广庄庆庐庑库应庙庞废庼廪开异弃张弥弪弯弹强归当录彟彦彻径徕御忆忏忧忾怀态怂怃怄怅怆怜总怼怿恋恳恶恸恹恺恻恼恽悦悫悬悭悯惊惧惨惩惫惬惭惮惯愍愠愤愦愿慑慭憷懑懒懔戆戋戏戗战戬户扎扑扦执扩扪扫扬扰抚抛抟抠抡抢护报担拟拢拣拥拦拧拨择挂挚挛挜挝挞挟挠挡挢挣挤挥挦捞损捡换捣据捻掳掴掷掸掺掼揸揽揿搀搁搂搅携摄摅摆摇摈摊撄撑撵撷撸撺擞攒敌敛数斋斓斗斩断无旧时旷旸昙昼昽显晋晒晓晔晕晖暂暧札术朴机杀杂权条来杨杩杰极构枞枢枣枥枧枨枪枫枭柜柠柽栀栅标栈栉栊栋栌栎栏树栖样栾桊桠桡桢档桤桥桦桧桨桩梦梼梾检棂椁椟椠椤椭楼榄榇榈榉槚槛槟槠横樯樱橥橱橹橼檐檩欢欤欧歼殁殇残殒殓殚殡殴毁毂毕毙毡毵氇气氢氩氲汇汉污汤汹沓沟没沣沤沥沦沧沨沩沪沵泞泪泶泷泸泺泻泼泽泾洁洒洼浃浅浆浇浈浉浊测浍济浏浐浑浒浓浔浕涂涌涛涝涞涟涠涡涢涣涤润涧涨涩淀渊渌渍渎渐渑渔渖渗温游湾湿溃溅溆溇滗滚滞滟滠满滢滤滥滦滨滩滪漤潆潇潋潍潜潴澜濑濒灏灭灯灵灾灿炀炉炖炜炝点炼炽烁烂烃烛烟烦烧烨烩烫烬热焕焖焘煅煳熘爱爷牍牦牵牺犊犟状犷犸犹狈狍狝狞独狭狮狯狰狱狲猃猎猕猡猪猫猬献獭玑玙玚玛玮环现玱玺珉珏珐珑珰珲琎琏琐琼瑶瑷璇璎瓒瓮瓯电画畅畲畴疖疗疟疠疡疬疮疯疱疴痈痉痒痖痨痪痫痴瘅瘆瘗瘘瘪瘫瘾瘿癞癣癫癯皑皱皲盏盐监盖盗盘眍眦眬着睁睐睑瞒瞩矫矶矾矿砀码砖砗砚砜砺砻砾础硁硅硕硖硗硙硚确硷碍碛碜碱碹磙礼祎祢祯祷祸禀禄禅离秃秆种积称秽秾稆税稣稳穑穷窃窍窑窜窝窥窦窭竖竞笃笋笔笕笺笼笾筑筚筛筜筝筹签简箓箦箧箨箩箪箫篑篓篮篱簖籁籴类籼粜粝粤粪粮糁糇紧絷纟纠纡红纣纤纥约级纨纩纪纫纬纭纮纯纰纱纲纳纴纵纶纷纸纹纺纻纼纽纾线绀绁绂练组绅细织终绉绊绋绌绍绎经绐绑绒结绔绕绖绗绘给绚绛络绝绞统绠绡绢绣绤绥绦继绨绩绪绫绬续绮绯绰绱绲绳维绵绶绷绸绹绺绻综绽绾绿缀缁缂缃缄缅缆缇缈缉缊缋缌缍缎缏缐缑缒缓缔缕编缗缘缙缚缛缜缝缞缟缠缡缢缣缤缥缦缧缨缩缪缫缬缭缮缯缰缱缲缳缴缵罂网罗罚罢罴羁羟羡翘翙翚耢耧耸耻聂聋职聍联聩聪肃肠肤肷肾肿胀胁胆胜胧胨胪胫胶脉脍脏脐脑脓脔脚脱脶脸腊腌腘腭腻腼腽腾膑臜舆舣舰舱舻艰艳艹艺节芈芗芜芦苁苇苈苋苌苍苎苏苘苹茎茏茑茔茕茧荆荐荙荚荛荜荞荟荠荡荣荤荥荦荧荨荩荪荫荬荭荮药莅莜莱莲莳莴莶获莸莹莺莼萚萝萤营萦萧萨葱蒇蒉蒋蒌蓝蓟蓠蓣蓥蓦蔷蔹蔺蔼蕲蕴薮藁藓虏虑虚虫虬虮虽虾虿蚀蚁蚂蚕蚝蚬蛊蛎蛏蛮蛰蛱蛲蛳蛴蜕蜗蜡蝇蝈蝉蝎蝼蝾螀螨蟏衅衔补衬衮袄袅袆袜袭袯装裆裈裢裣裤裥褛褴襁襕见观觃规觅视觇览觉觊觋觌觍觎觏觐觑觞触觯詟誉誊讠计订讣认讥讦讧讨让讪讫训议讯记讱讲讳讴讵讶讷许讹论讻讼讽设访诀证诂诃评诅识诇诈诉诊诋诌词诎诏诐译诒诓诔试诖诗诘诙诚诛诜话诞诟诠诡询诣诤该详诧诨诩诪诫诬语诮误诰诱诲诳说诵诶请诸诹诺读诼诽课诿谀谁谂调谄谅谆谇谈谊谋谌谍谎谏谐谑谒谓谔谕谖谗谘谙谚谛谜谝谞谟谠谡谢谣谤谥谦谧谨谩谪谫谬谭谮谯谰谱谲谳谴谵谶谷豮贝贞负贠贡财责贤败账货质贩贪贫贬购贮贯贰贱贲贳贴贵贶贷贸费贺贻贼贽贾贿赀赁赂赃资赅赆赇赈赉赊赋赌赍赎赏赐赑赒赓赔赕赖赗赘赙赚赛赜赝赞赟赠赡赢赣赪赵赶趋趱趸跃跄跖跞践跶跷跸跹跻踊踌踪踬踯蹑蹒蹰蹿躏躜躯车轧轨轩轪轫转轭轮软轰轱轲轳轴轵轶轷轸轹轺轻轼载轾轿辀辁辂较辄辅辆辇辈辉辊辋辌辍辎辏辐辑辒输辔辕辖辗辘辙辚辞辩辫边辽达迁过迈运还这进远违连迟迩迳迹适选逊递逦逻遗遥邓邝邬邮邹邺邻郁郄郏郐郑郓郦郧郸酝酦酱酽酾酿释里鉅鉴銮錾钆钇针钉钊钋钌钍钎钏钐钑钒钓钔钕钖钗钘钙钚钛钝钞钟钠钡钢钣钤钥钦钧钨钩钪钫钬钭钮钯钰钱钲钳钴钵钶钷钸钹钺钻钼钽钾钿铀铁铂铃铄铅铆铈铉铊铋铍铎铏铐铑铒铕铗铘铙铚铛铜铝铞铟铠铡铢铣铤铥铦铧铨铪铫铬铭铮铯铰铱铲铳铴铵银铷铸铹铺铻铼铽链铿销锁锂锃锄锅锆锇锈锉锊锋锌锍锎锏锐锑锒锓锔锕锖锗错锚锜锞锟锠锡锢锣锤锥锦锨锩锫锬锭键锯锰锱锲锳锴锵锶锷锸锹锺锻锼锽锾锿镀镁镂镃镆镇镈镉镊镌镍镎镏镐镑镒镕镖镗镙镚镛镜镝镞镟镠镡镢镣镤镥镦镧镨镩镪镫镬镭镮镯镰镱镲镳镴镶长门闩闪闫闬闭问闯闰闱闲闳间闵闶闷闸闹闺闻闼闽闾闿阀阁阂阃阄阅阆阇阈阉阊阋阌阍阎阏阐阑阒阓阔阕阖阗阘阙阚阛队阳阴阵阶际陆陇陈陉陕陧陨险随隐隶隽难雏雠雳雾霁霉霭靓静靥鞑鞒鞯鞴韦韧韨韩韪韫韬韵页顶顷顸项顺须顼顽顾顿颀颁颂颃预颅领颇颈颉颊颋颌颍颎颏颐频颒颓颔颕颖颗题颙颚颛颜额颞颟颠颡颢颣颤颥颦颧风飏飐飑飒飓飔飕飖飗飘飙飚飞飨餍饤饥饦饧饨饩饪饫饬饭饮饯饰饱饲饳饴饵饶饷饸饹饺饻饼饽饾饿馀馁馂馃馄馅馆馇馈馉馊馋馌馍馎馏馐馑馒馓馔馕马驭驮驯驰驱驲驳驴驵驶驷驸驹驺驻驼驽驾驿骀骁骂骃骄骅骆骇骈骉骊骋验骍骎骏骐骑骒骓骔骕骖骗骘骙骚骛骜骝骞骟骠骡骢骣骤骥骦骧髅髋髌鬓魇魉鱼鱽鱾鱿鲀鲁鲂鲄鲅鲆鲇鲈鲉鲊鲋鲌鲍鲎鲏鲐鲑鲒鲓鲔鲕鲖鲗鲘鲙鲚鲛鲜鲝鲞鲟鲠鲡鲢鲣鲤鲥鲦鲧鲨鲩鲪鲫鲬鲭鲮鲯鲰鲱鲲鲳鲴鲵鲶鲷鲸鲹鲺鲻鲼鲽鲾鲿鳀鳁鳂鳃鳄鳅鳆鳇鳈鳉鳊鳋鳌鳍鳎鳏鳐鳑鳒鳓鳔鳕鳖鳗鳘鳙鳛鳜鳝鳞鳟鳠鳡鳢鳣鸟鸠鸡鸢鸣鸤鸥鸦鸧鸨鸩鸪鸫鸬鸭鸮鸯鸰鸱鸲鸳鸴鸵鸶鸷鸸鸹鸺鸻鸼鸽鸾鸿鹀鹁鹂鹃鹄鹅鹆鹇鹈鹉鹊鹋鹌鹍鹎鹏鹐鹑鹒鹓鹔鹕鹖鹗鹘鹚鹛鹜鹝鹞鹟鹠鹡鹢鹣鹤鹥鹦鹧鹨鹩鹪鹫鹬鹭鹯鹰鹱鹲鹳鹴鹾麦麸黄黉黡黩黪黾鼋鼌鼍鼗鼹齄齐齑齿龀龁龂龃龄龅龆龇龈龉龊龋龌龙龚龛龟志制咨只里系范松没尝尝闹面准钟别闲干尽脏拼';
7 | t = '萬與醜專業叢東絲丟兩嚴喪個爿豐臨為麗舉麼義烏樂喬習鄉書買亂爭於虧雲亙亞產畝親褻嚲億僅從侖倉儀們價眾優夥會傴傘偉傳傷倀倫傖偽佇體餘傭僉俠侶僥偵側僑儈儕儂俁儔儼倆儷儉債傾傯僂僨償儻儐儲儺兒兌兗黨蘭關興茲養獸囅內岡冊寫軍農塚馮衝決況凍淨淒涼淩減湊凜幾鳳鳧憑凱擊氹鑿芻劃劉則剛創刪別剗剄劊劌剴劑剮劍剝劇勸辦務勱動勵勁勞勢勳猛勩勻匭匱區醫華協單賣盧鹵臥衛卻巹廠廳曆厲壓厭厙廁廂厴廈廚廄廝縣參靉靆雙發變敘疊葉號歎嘰籲後嚇呂嗎唚噸聽啟吳嘸囈嘔嚦唄員咼嗆嗚詠哢嚨嚀噝吒噅鹹呱響啞噠嘵嗶噦嘩噲嚌噥喲嘜嗊嘮啢嗩唕喚呼嘖嗇囀齧囉嘽嘯噴嘍嚳囁嗬噯噓嚶囑嚕劈囂謔團園囪圍圇國圖圓聖壙場阪壞塊堅壇壢壩塢墳墜壟壟壚壘墾坰堊墊埡墶壋塏堖塒塤堝墊垵塹墮壪牆壯聲殼壺壼處備複夠頭誇夾奪奩奐奮獎奧妝婦媽嫵嫗媯姍薑婁婭嬈嬌孌娛媧嫻嫿嬰嬋嬸媼嬡嬪嬙嬤孫學孿寧寶實寵審憲宮寬賓寢對尋導壽將爾塵堯尷屍盡層屭屜屆屬屢屨嶼歲豈嶇崗峴嶴嵐島嶺嶽崠巋嶨嶧峽嶢嶠崢巒嶗崍嶮嶄嶸嶔崳嶁脊巔鞏巰幣帥師幃帳簾幟帶幀幫幬幘幗冪襆幹並廣莊慶廬廡庫應廟龐廢廎廩開異棄張彌弳彎彈強歸當錄彠彥徹徑徠禦憶懺憂愾懷態慫憮慪悵愴憐總懟懌戀懇惡慟懨愷惻惱惲悅愨懸慳憫驚懼慘懲憊愜慚憚慣湣慍憤憒願懾憖怵懣懶懍戇戔戲戧戰戩戶紮撲扡執擴捫掃揚擾撫拋摶摳掄搶護報擔擬攏揀擁攔擰撥擇掛摯攣掗撾撻挾撓擋撟掙擠揮撏撈損撿換搗據撚擄摑擲撣摻摜摣攬撳攙擱摟攪攜攝攄擺搖擯攤攖撐攆擷擼攛擻攢敵斂數齋斕鬥斬斷無舊時曠暘曇晝曨顯晉曬曉曄暈暉暫曖劄術樸機殺雜權條來楊榪傑極構樅樞棗櫪梘棖槍楓梟櫃檸檉梔柵標棧櫛櫳棟櫨櫟欄樹棲樣欒棬椏橈楨檔榿橋樺檜槳樁夢檮棶檢欞槨櫝槧欏橢樓欖櫬櫚櫸檟檻檳櫧橫檣櫻櫫櫥櫓櫞簷檁歡歟歐殲歿殤殘殞殮殫殯毆毀轂畢斃氈毿氌氣氫氬氳彙漢汙湯洶遝溝沒灃漚瀝淪滄渢溈滬濔濘淚澩瀧瀘濼瀉潑澤涇潔灑窪浹淺漿澆湞溮濁測澮濟瀏滻渾滸濃潯濜塗湧濤澇淶漣潿渦溳渙滌潤澗漲澀澱淵淥漬瀆漸澠漁瀋滲溫遊灣濕潰濺漵漊潷滾滯灩灄滿瀅濾濫灤濱灘澦濫瀠瀟瀲濰潛瀦瀾瀨瀕灝滅燈靈災燦煬爐燉煒熗點煉熾爍爛烴燭煙煩燒燁燴燙燼熱煥燜燾煆糊溜愛爺牘犛牽犧犢強狀獷獁猶狽麅獮獰獨狹獅獪猙獄猻獫獵獼玀豬貓蝟獻獺璣璵瑒瑪瑋環現瑲璽瑉玨琺瓏璫琿璡璉瑣瓊瑤璦璿瓔瓚甕甌電畫暢佘疇癤療瘧癘瘍鬁瘡瘋皰屙癰痙癢瘂癆瘓癇癡癉瘮瘞瘺癟癱癮癭癩癬癲臒皚皺皸盞鹽監蓋盜盤瞘眥矓著睜睞瞼瞞矚矯磯礬礦碭碼磚硨硯碸礪礱礫礎硜矽碩硤磽磑礄確鹼礙磧磣堿镟滾禮禕禰禎禱禍稟祿禪離禿稈種積稱穢穠穭稅穌穩穡窮竊竅窯竄窩窺竇窶豎競篤筍筆筧箋籠籩築篳篩簹箏籌簽簡籙簀篋籜籮簞簫簣簍籃籬籪籟糴類秈糶糲粵糞糧糝餱緊縶糸糾紆紅紂纖紇約級紈纊紀紉緯紜紘純紕紗綱納紝縱綸紛紙紋紡紵紖紐紓線紺絏紱練組紳細織終縐絆紼絀紹繹經紿綁絨結絝繞絰絎繪給絢絳絡絕絞統綆綃絹繡綌綏絛繼綈績緒綾緓續綺緋綽緔緄繩維綿綬繃綢綯綹綣綜綻綰綠綴緇緙緗緘緬纜緹緲緝縕繢緦綞緞緶線緱縋緩締縷編緡緣縉縛縟縝縫縗縞纏縭縊縑繽縹縵縲纓縮繆繅纈繚繕繒韁繾繰繯繳纘罌網羅罰罷羆羈羥羨翹翽翬耮耬聳恥聶聾職聹聯聵聰肅腸膚膁腎腫脹脅膽勝朧腖臚脛膠脈膾髒臍腦膿臠腳脫腡臉臘醃膕齶膩靦膃騰臏臢輿艤艦艙艫艱豔艸藝節羋薌蕪蘆蓯葦藶莧萇蒼苧蘇檾蘋莖蘢蔦塋煢繭荊薦薘莢蕘蓽蕎薈薺蕩榮葷滎犖熒蕁藎蓀蔭蕒葒葤藥蒞蓧萊蓮蒔萵薟獲蕕瑩鶯蓴蘀蘿螢營縈蕭薩蔥蕆蕢蔣蔞藍薊蘺蕷鎣驀薔蘞藺藹蘄蘊藪槁蘚虜慮虛蟲虯蟣雖蝦蠆蝕蟻螞蠶蠔蜆蠱蠣蟶蠻蟄蛺蟯螄蠐蛻蝸蠟蠅蟈蟬蠍螻蠑螿蟎蠨釁銜補襯袞襖嫋褘襪襲襏裝襠褌褳襝褲襇褸襤繈襴見觀覎規覓視覘覽覺覬覡覿覥覦覯覲覷觴觸觶讋譽謄訁計訂訃認譏訐訌討讓訕訖訓議訊記訒講諱謳詎訝訥許訛論訩訟諷設訪訣證詁訶評詛識詗詐訴診詆謅詞詘詔詖譯詒誆誄試詿詩詰詼誠誅詵話誕詬詮詭詢詣諍該詳詫諢詡譸誡誣語誚誤誥誘誨誑說誦誒請諸諏諾讀諑誹課諉諛誰諗調諂諒諄誶談誼謀諶諜謊諫諧謔謁謂諤諭諼讒諮諳諺諦謎諞諝謨讜謖謝謠謗諡謙謐謹謾謫譾謬譚譖譙讕譜譎讞譴譫讖穀豶貝貞負貟貢財責賢敗賬貨質販貪貧貶購貯貫貳賤賁貰貼貴貺貸貿費賀貽賊贄賈賄貲賃賂贓資賅贐賕賑賚賒賦賭齎贖賞賜贔賙賡賠賧賴賵贅賻賺賽賾贗讚贇贈贍贏贛赬趙趕趨趲躉躍蹌蹠躒踐躂蹺蹕躚躋踴躊蹤躓躑躡蹣躕躥躪躦軀車軋軌軒軑軔轉軛輪軟轟軲軻轤軸軹軼軤軫轢軺輕軾載輊轎輈輇輅較輒輔輛輦輩輝輥輞輬輟輜輳輻輯轀輸轡轅轄輾轆轍轔辭辯辮邊遼達遷過邁運還這進遠違連遲邇逕跡適選遜遞邐邏遺遙鄧鄺鄔郵鄒鄴鄰鬱郤郟鄶鄭鄆酈鄖鄲醞醱醬釅釃釀釋裏钜鑒鑾鏨釓釔針釘釗釙釕釷釺釧釤鈒釩釣鍆釹鍚釵鈃鈣鈈鈦鈍鈔鍾鈉鋇鋼鈑鈐鑰欽鈞鎢鉤鈧鈁鈥鈄鈕鈀鈺錢鉦鉗鈷缽鈳鉕鈽鈸鉞鑽鉬鉭鉀鈿鈾鐵鉑鈴鑠鉛鉚鈰鉉鉈鉍鈹鐸鉶銬銠鉺銪鋏鋣鐃銍鐺銅鋁銱銦鎧鍘銖銑鋌銩銛鏵銓鉿銚鉻銘錚銫鉸銥鏟銃鐋銨銀銣鑄鐒鋪鋙錸鋱鏈鏗銷鎖鋰鋥鋤鍋鋯鋨鏽銼鋝鋒鋅鋶鐦鐧銳銻鋃鋟鋦錒錆鍺錯錨錡錁錕錩錫錮鑼錘錐錦鍁錈錇錟錠鍵鋸錳錙鍥鍈鍇鏘鍶鍔鍤鍬鍾鍛鎪鍠鍰鎄鍍鎂鏤鎡鏌鎮鎛鎘鑷鐫鎳鎿鎦鎬鎊鎰鎔鏢鏜鏍鏰鏞鏡鏑鏃鏇鏐鐔钁鐐鏷鑥鐓鑭鐠鑹鏹鐙鑊鐳鐶鐲鐮鐿鑔鑣鑞鑲長門閂閃閆閈閉問闖閏闈閑閎間閔閌悶閘鬧閨聞闥閩閭闓閥閣閡閫鬮閱閬闍閾閹閶鬩閿閽閻閼闡闌闃闠闊闋闔闐闒闕闞闤隊陽陰陣階際陸隴陳陘陝隉隕險隨隱隸雋難雛讎靂霧霽黴靄靚靜靨韃鞽韉韝韋韌韍韓韙韞韜韻頁頂頃頇項順須頊頑顧頓頎頒頌頏預顱領頗頸頡頰頲頜潁熲頦頤頻頮頹頷頴穎顆題顒顎顓顏額顳顢顛顙顥纇顫顬顰顴風颺颭颮颯颶颸颼颻飀飄飆飆飛饗饜飣饑飥餳飩餼飪飫飭飯飲餞飾飽飼飿飴餌饒餉餄餎餃餏餅餑餖餓餘餒餕餜餛餡館餷饋餶餿饞饁饃餺餾饈饉饅饊饌饢馬馭馱馴馳驅馹駁驢駔駛駟駙駒騶駐駝駑駕驛駘驍罵駰驕驊駱駭駢驫驪騁驗騂駸駿騏騎騍騅騌驌驂騙騭騤騷騖驁騮騫騸驃騾驄驏驟驥驦驤髏髖髕鬢魘魎魚魛魢魷魨魯魴魺鮁鮃鯰鱸鮋鮓鮒鮊鮑鱟鮍鮐鮭鮚鮳鮪鮞鮦鰂鮜鱠鱭鮫鮮鮺鯗鱘鯁鱺鰱鰹鯉鰣鰷鯀鯊鯇鮶鯽鯒鯖鯪鯕鯫鯡鯤鯧鯝鯢鯰鯛鯨鯵鯴鯔鱝鰈鰏鱨鯷鰮鰃鰓鱷鰍鰒鰉鰁鱂鯿鰠鼇鰭鰨鰥鰩鰟鰜鰳鰾鱈鱉鰻鰵鱅鰼鱖鱔鱗鱒鱯鱤鱧鱣鳥鳩雞鳶鳴鳲鷗鴉鶬鴇鴆鴣鶇鸕鴨鴞鴦鴒鴟鴝鴛鴬鴕鷥鷙鴯鴰鵂鴴鵃鴿鸞鴻鵐鵓鸝鵑鵠鵝鵒鷳鵜鵡鵲鶓鵪鶤鵯鵬鵮鶉鶊鵷鷫鶘鶡鶚鶻鶿鶥鶩鷊鷂鶲鶹鶺鷁鶼鶴鷖鸚鷓鷚鷯鷦鷲鷸鷺鸇鷹鸌鸏鸛鸘鹺麥麩黃黌黶黷黲黽黿鼂鼉鞀鼴齇齊齏齒齔齕齗齟齡齙齠齜齦齬齪齲齷龍龔龕龜誌製谘隻裡係範鬆冇嚐嘗鬨麵準鐘彆閒乾儘臟拚';
8 |
9 | function t2cn(str) {
10 | var newStr = '';
11 | for(var i = 0; i < str.length; i++) {
12 | var index = t.indexOf(str[i]);
13 | newStr += index == -1 ? str[i] : cn[index];
14 | }
15 | return newStr;
16 | }
17 |
18 | function OnGetNewName(getNewNameData)
19 | {
20 | return t2cn(getNewNameData.newname);
21 | }
--------------------------------------------------------------------------------
/Rename Scripts/阿拉伯数字转中文数字-WSQL.vbs:
--------------------------------------------------------------------------------
1 | ' 阿拉伯数字转中文数字-WSQL(数字改中文)
2 | ' 作者:WSQL
3 | ' 版本:220619
4 | ' 主页:https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | Function OnGetNewName(ByRef getNewNameData)
7 | Set Item = getNewNameData.Item
8 | '正则表达式判断
9 | Dim Reg
10 | Set Reg = CreateObject("vbscript.regexp")
11 | Reg.Pattern = "(\d{1,})" '正则表达式
12 | Reg.Global = True '匹配所有项
13 | Set Match = Reg.Execute(Item.name_stem)
14 | '当匹配数>=1时就改名
15 | Dim NewName
16 | NewName = Item.name_stem
17 | If Match.Count >= 1 Then
18 | For Each M In Match '遍历所有匹配对象
19 |
20 | NewName = Replace(NewName, M.SubMatches(0), NumToChinese(M.SubMatches(0), getNewNameData.custom.my_option))
21 | Next
22 | OnGetNewName = NewName & Item.ext
23 | Else
24 | OnGetNewName = True
25 | End If
26 | End Function
27 |
28 |
29 | '数字转中文函数
30 | Function NumToChinese(StrEng, my_option)
31 | Dim intLen, intCounter, strCh, strTempCh, strSeqCh1, strSeqCh2, strEng2Ch, i
32 | '去掉前面的0
33 | For i = 1 To Len(StrEng) - 1
34 | If Mid(StrEng, i, 1) = "0" Then
35 | StrEng = Right(StrEng, Len(StrEng - 1))
36 | Else
37 | Exit For
38 | End If
39 | Next
40 | DOpus.Output my_option
41 | If my_option = -1 Then
42 | strEng2Ch = "零壹贰叁肆伍陆柒捌玖"
43 | strSeqCh1 = " 拾佰仟 拾佰仟 拾佰仟 拾佰仟"
44 | strSeqCh2 = " 万亿兆"
45 | Else
46 | strEng2Ch = "零一二三四五六七八九"
47 | strSeqCh1 = " 十百千 十百千 十百千 十百千"
48 | strSeqCh2 = " 万亿兆"
49 | End If
50 | intLen = Len(StrEng)
51 | For intCounter = 1 To intLen
52 | strTempCh = Mid(strEng2Ch, CInt(Mid(StrEng, intCounter, 1)) + 1, 1)
53 | If strTempCh = "零" And intLen <> 1 Then
54 | If Mid(StrEng, intCounter + 1, 1) = "0" Or (intLen - intCounter + 1) Mod 4 = 1 Then
55 | strTempCh = ""
56 | End If
57 | Else
58 | strTempCh = strTempCh & Trim(Mid(strSeqCh1, intLen - intCounter + 1, 1))
59 | End If
60 | If (intLen - intCounter + 1) Mod 4 = 1 Then
61 | strTempCh = strTempCh & Mid(strSeqCh2, (intLen - intCounter + 1) \ 4 + 1, 1)
62 | If intCounter > 3 Then
63 | If Mid(StrEng, intCounter - 3, 4) = "0000" Then strTempCh = Left(strTempCh, Len(strTempCh) - 1)
64 | End If
65 | End If
66 | strCh = strCh & Trim(strTempCh)
67 | Next
68 | NumToChinese = strCh
69 | End Function
70 | '增加是否转换成大写的选项
71 | Function OnGetCustomFields(ByRef getFieldData)
72 | getFieldData.Fields.my_option = False
73 | getFieldData.field_labels("my_option") = "是否转换成大写数字,大写:壹佰贰拾伍,小写:一百二十五"
74 | End Function
75 |
76 |
--------------------------------------------------------------------------------
/Rename Scripts/阿拉伯数字转中文数字-无单位.js:
--------------------------------------------------------------------------------
1 | // 阿拉伯数字转中文数字-无单位
2 | // 作者:@Chaoses-Ib
3 | // 版本:220626.2
4 | // 仓库:https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | // 从命令进行调用:
7 | // Rename PRESET="阿拉伯数字转中文数字-无单位" SCRIPTARG onlyFirstNumber:true upperCase:false
8 |
9 | function OnGetCustomFields(getFieldData)
10 | {
11 | getFieldData.fields.onlyFirstNumber = true
12 | getFieldData.field_labels('onlyFirstNumber') = '只转换第一段数字'
13 |
14 | getFieldData.fields.upperCase = false
15 | getFieldData.field_labels('upperCase') = '大写中文数字'
16 | }
17 |
18 | function OnGetNewName(getNewNameData)
19 | {
20 | var regex = getNewNameData.custom.onlyFirstNumber ? /[0-9]+/ : /[0-9]+/g
21 | var numTable = getNewNameData.custom.upperCase ? '零壹贰叁肆伍陆柒捌玖' : '零一二三四五六七八九'
22 |
23 | return getNewNameData.newname_stem_m.replace(regex, function(number){
24 | return number.replace(/[0-9]/g, function(digit){ return numTable[digit] })
25 | }) + getNewNameData.newname_ext_m
26 | }
--------------------------------------------------------------------------------
/Scripts/DialogJump.ahk:
--------------------------------------------------------------------------------
1 | ; DialogJump
2 | ; Description: When in the editor of the file dialog, press Ctrl+G to jump to the last activated folder of listers. If Ctrl+G does not work, type "//cur " to trigger it. (AHK v2)
3 | ; Author: Chaoses Ib
4 | ; Version: 220519.2
5 | ; Git: https://github.com/Chaoses-Ib/IbDOpusScripts
6 |
7 | dopusrt := GetDOpusRT()
8 |
9 | DOpus_SendPath(){
10 | global dopusrt
11 | if (dopusrt == "")
12 | dopusrt := GetDOpusRT()
13 |
14 | if (A_IsAdmin) {
15 | ; running DOpusRT as elevated can't get the result
16 | FileDelete(A_Temp "\DOpus_pathlist.txt")
17 | RunAsUnelevated(dopusrt, "/info " A_Temp "\DOpus_pathlist.txt,paths")
18 | while !FileExist(A_Temp "\DOpus_pathlist.txt") {
19 | Sleep(20)
20 | }
21 | } else {
22 | RunWait dopusrt " /info " A_Temp "\DOpus_pathlist.txt,paths"
23 | }
24 | paths := FileRead(A_Temp "\DOpus_pathlist.txt")
25 | RegExMatch(paths, ']* tab_state="1">([^<]*)' , &Match)
26 | if(!Match)
27 | return
28 |
29 | clipboard := ClipboardAll()
30 | A_Clipboard := Match[1]
31 | Send "+{Insert}`n" ;or ^v
32 | Sleep 200
33 | A_Clipboard := clipboard
34 | clipboard := ""
35 |
36 | ;Send "{Text}" Match[1] "`n"
37 | ;incompatible with some input methods (Sogou Pinyin)
38 | }
39 |
40 | #HotIf WinActive("ahk_class #32770") ;File dialog
41 | ^g::DOpus_SendPath()
42 | #HotIf
43 |
44 | #Hotstring EndChars `n `t
45 | :OX://cur::DOpus_SendPath()
46 |
47 | GetDOpusRT(){
48 | try
49 | return StrReplace(WinGetProcessPath("ahk_exe dopus.exe"), "dopus.exe", "dopusrt.exe")
50 | catch TargetError
51 | ; WinGetProcessPath requires the target to have a window
52 | return ""
53 |
54 | ;return A_ProgramFiles . "\GPSoftware\Directory Opus\dopusrt.exe"
55 | }
56 |
57 | ; From Bluesmaster, https://www.autohotkey.com/board/topic/72812-run-as-standard-limited-user/?p=670991
58 | RunAsUnelevated(prms*){
59 | ComObject("Shell.Application").Windows.FindWindowSW(0, 0, 8, 0, 1 ).Document.Application.ShellExecute(prms*)
60 | }
--------------------------------------------------------------------------------
/Scripts/EventWatchers/OnActivateTab.js:
--------------------------------------------------------------------------------
1 | //EventWatchers.OnActivateTab
2 | //Author: Chaoses Ib
3 | //Version: 210821
4 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | function OnActivateTab(activateTabData){
7 | DOpus.Output(activateTabData.oldtab.displayed_label + " -> " + activateTabData.newtab.displayed_label + ", " + activateTabData.qualifiers)
8 | }
--------------------------------------------------------------------------------
/Scripts/EventWatchers/OnAddColumns & OnScriptColumn.js:
--------------------------------------------------------------------------------
1 | //EventWatchers.OnAddColumns & OnScriptColumn
2 | //Author: Chaoses Ib
3 | //Version: 211202
4 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | function OnAddColumns(addColData){
7 | DOpus.Output("OnAddColumns") //no output?
8 |
9 | var col = addColData.AddColumn()
10 | col.name = "MyScriptColumn"
11 | col.method = "OnMyScriptColumn"
12 | col.label = "MyScriptColumn.label"
13 | col.header = "MyScriptColumn.header"
14 | col.autogroup = true
15 | }
16 |
17 | function OnMyScriptColumn(scriptColData){
18 | DOpus.Output("OnMyScriptColumn: " + +new Date() + ", " + scriptColData.item.name)
19 | // item:
20 | // realpath: symbolic links and junctions are not reparsed
21 | scriptColData.value =
22 | (scriptColData.item.is_dir ? "d" : "f")
23 | + (scriptColData.item.is_reparse ? "r" : "")
24 | + (scriptColData.item.is_symlink ? "s" : "")
25 | + (scriptColData.item.is_junction ? "j" : "")
26 | }
--------------------------------------------------------------------------------
/Scripts/EventWatchers/OnAvtivateLister.js:
--------------------------------------------------------------------------------
1 | //EventWatchers.OnActivateLister
2 | //Author: Chaoses Ib
3 | //Version: 210821
4 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | function OnActivateLister(activateListerData){
7 | DOpus.Output(activateListerData.lister.title + ", " + activateListerData.active + ", " + activateListerData.qualifiers)
8 | }
--------------------------------------------------------------------------------
/Scripts/EventWatchers/OnScriptColumn Measure.js:
--------------------------------------------------------------------------------
1 | //EventWatchers.OnScriptColumn Measure
2 | //Author: Chaoses Ib
3 | //Version: 210821
4 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | function OnAddColumns(addColData){
7 | DOpus.Output("OnAddColumns")
8 |
9 | var col = addColData.AddColumn()
10 | col.name = "MyScriptColumn_Measure"
11 | col.method = "OnMyScriptColumn"
12 | col.label = "MyScriptColumn Measure"
13 | col.autogroup = true
14 | }
15 |
16 | function f(scriptColData){
17 | scriptColData.value =
18 | (scriptColData.item.is_dir ? "d" : "f")
19 | + (scriptColData.item.is_reparse ? "r" : "")
20 | + (scriptColData.item.is_symlink ? "s" : "")
21 | + (scriptColData.item.is_junction ? "j" : "")
22 | }
23 |
24 | function OnMyScriptColumn(scriptColData){
25 | var vars = scriptColData.tab.vars
26 | if (!vars.Exists("Measure.count")){
27 | vars.Set("Measure.count", 0)
28 | }
29 | var count = vars.Get("Measure.count") + 1
30 | vars.Set("Measure.count", count)
31 | if (count == 1){
32 | var time = +new Date()
33 | vars.Set("Measure.timeBegin", time)
34 | DOpus.Output(time + ", first, " + scriptColData.item.name)
35 | }
36 |
37 | f(scriptColData)
38 |
39 | var time = +new Date()
40 | vars.Set("Measure.timeLast", time)
41 | }
42 |
43 | function OnActivateLister(activateListerData){
44 | if(activateListerData.active == false){
45 | var tab = activateListerData.lister.activetab
46 | var vars = tab.vars
47 | if(vars.Exists("Measure.count")){
48 | var count = vars.Get("Measure.count")
49 | if(count != 0){
50 | var timeLast = vars.Get("Measure.timeLast")
51 | duration = timeLast - vars.Get("Measure.timeBegin")
52 | DOpus.Output(timeLast + ", " + duration + "ms/" + count + " = " + (duration/count).toFixed(2) + "ms")
53 |
54 | vars.Set("Measure.count", 0)
55 | }
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/Scripts/EventWatchers/OnTabClick.js:
--------------------------------------------------------------------------------
1 | //EventWatchers.OnTabClick
2 | //Author: Chaoses Ib
3 | //Version: 210821
4 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | function OnTabClick(tabClickData){
7 | DOpus.Output(tabClickData.tab.displayed_label + ", " + tabClickData.qualifiers)
8 | }
--------------------------------------------------------------------------------
/Scripts/EventWatchers/OnViewerEvent.js:
--------------------------------------------------------------------------------
1 | //EventWatchers.OnViewerEvent
2 | //Author: Chaoses Ib
3 | //Version: 210821
4 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | function OnViewerEvent(viewerEventData){
7 | info = "OnViewerEvent: " + viewerEventData.event
8 | if (viewerEventData.viewer.current)
9 | info += ", " + viewerEventData.viewer.current.name
10 |
11 | if (viewerEventData.event == "load"){
12 | //info += ", " + viewerEventData.item.name //the same as viewerEventData.viewer.current.name
13 | info += ", " + (viewerEventData.viewer.index + 1) + "/" + viewerEventData.viewer.files.count
14 | }
15 | else if (viewerEventData.event == "click" || viewerEventData.event == "dblclk" || viewerEventData.event == "mclick")
16 | info += ", (" + viewerEventData.x + ", " + viewerEventData.y + ", " + viewerEventData.w + ", " + viewerEventData.h + ")"
17 |
18 | DOpus.Output(info)
19 | }
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Oo]ut/
33 | [Ll]og/
34 | [Ll]ogs/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # ASP.NET Scaffolding
67 | ScaffoldingReadMe.txt
68 |
69 | # StyleCop
70 | StyleCopReport.xml
71 |
72 | # Files built by Visual Studio
73 | *_i.c
74 | *_p.c
75 | *_h.h
76 | *.ilk
77 | *.meta
78 | *.obj
79 | *.iobj
80 | *.pch
81 | *.pdb
82 | *.ipdb
83 | *.pgc
84 | *.pgd
85 | *.rsp
86 | *.sbr
87 | *.tlb
88 | *.tli
89 | *.tlh
90 | *.tmp
91 | *.tmp_proj
92 | *_wpftmp.csproj
93 | *.log
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | # Ionide (cross platform F# VS Code tools) working folder
360 | .ionide/
361 |
362 | # Fody - auto-generated XML schema
363 | FodyWeavers.xsd
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/MaxViewerPane.cmd.dcf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Maximize the viewer pane.
5 | #viewerpane2
6 |
7 | MaxViewerPane
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/MaxViewerPane.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net48
6 | 11.0
7 | enable
8 |
9 |
10 |
11 |
12 | all
13 | runtime; build; native; contentfiles; analyzers; buildtransitive
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/MaxViewerPane.js:
--------------------------------------------------------------------------------
1 | function OnInit(scriptInitData)
2 | {
3 | scriptInitData.name = "MaxViewerPane";
4 | scriptInitData.desc = DOpus.strings.Get('description');
5 | scriptInitData.version = "0.2";
6 | scriptInitData.copyright = "Chaoses Ib";
7 | scriptInitData.url = "https://github.com/Chaoses-Ib/IbDOpusScripts";
8 | scriptInitData.default_enable = true;
9 |
10 | var config_desc = DOpus.Create().Map();
11 |
12 | var exePath = DOpus.FSUtil.NewPath(scriptInitData.file);
13 | exePath.Parent();
14 | exePath.Add("MaxViewerPane");
15 | exePath.Add("MaxViewerPane.exe");
16 | scriptInitData.config.ExePath = String(exePath);
17 | config_desc("ExePath") = DOpus.strings.Get('exePath');
18 |
19 | scriptInitData.config_desc = config_desc;
20 |
21 | var cmd = scriptInitData.AddCommand();
22 | cmd.name = "MaxViewerPane";
23 | cmd.desc = DOpus.strings.Get('description');
24 | cmd.method = "OnMaxViewerPane";
25 | }
26 |
27 | function OnMaxViewerPane(scriptCommandData) {
28 | var lister = scriptCommandData.func.sourcetab.lister;
29 | var cmd = scriptCommandData.func.command;
30 | cmd.AddLine("@runmode:hide");
31 | cmd.AddLine(Script.config.ExePath
32 | + ' "' + lister.title
33 | + '" ' + lister.left
34 | + ' ' + lister.top
35 | + ' ' + lister.right
36 | + ' ' + lister.bottom
37 | );
38 | cmd.Run();
39 | }
40 |
41 | ==SCRIPT RESOURCES
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/MaxViewerPane.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.6.33723.286
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaxViewerPane", "MaxViewerPane.csproj", "{F5FCAAC8-C0CF-4CF2-B79C-C622014A2246}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {F5FCAAC8-C0CF-4CF2-B79C-C622014A2246}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {F5FCAAC8-C0CF-4CF2-B79C-C622014A2246}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {F5FCAAC8-C0CF-4CF2-B79C-C622014A2246}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {F5FCAAC8-C0CF-4CF2-B79C-C622014A2246}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {007B404E-6CCB-44A6-8520-9173F08B1B77}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/NativeMethods.txt:
--------------------------------------------------------------------------------
1 | FindWindowEx
2 | GetWindowRect
3 | ScreenToClient
4 | SetWindowPos
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using Windows.Win32;
4 | using Windows.Win32.Foundation;
5 | using Windows.Win32.UI.WindowsAndMessaging;
6 |
7 | namespace MaxViewerPane
8 | {
9 | internal class Program
10 | {
11 | ///
12 | ///
13 | /// - When a viewer pane is displayed.
14 | /// - When a lister with viewer pane is resized.
15 | /// - When the layout of a viewer pane is changed.
16 | ///
17 | ///
18 | static void Main(string[] args)
19 | {
20 | if (MaxViewerPane(args) is false)
21 | {
22 | Console.Error.WriteLine($"Args: {string.Join(" ", args)}");
23 | Console.ReadKey();
24 | }
25 | }
26 |
27 | static bool MaxViewerPane(string[] args)
28 | {
29 | if (args.Length < 5)
30 | {
31 | Console.Error.WriteLine("Usage: MaxViewerPane.exe ");
32 | return false;
33 | }
34 | var title = args[0];
35 | int left = int.Parse(args[1]);
36 | int top = int.Parse(args[2]);
37 | int right = int.Parse(args[3]) - 1;
38 | int bottom = int.Parse(args[4]) - 1;
39 |
40 | // TODO: There may be multiple listers with the same title and the same position.
41 | var lister = PInvoke.FindWindowEx(default, default, "dopus.lister", title);
42 | /*
43 | while (lister != default)
44 | {
45 | RECT rect;
46 | // TODO: Why GetWindowRect outputs wrong values?
47 | if (PInvoke.GetWindowRect(lister, out rect)
48 | && rect.left == left && rect.top == top && rect.right == right && rect.bottom == bottom)
49 | {
50 | break;
51 | }
52 | lister = PInvoke.FindWindowEx(default, lister, "dopus.lister", title);
53 | }
54 | */
55 | if (lister == default)
56 | {
57 | Console.Error.WriteLine("Lister not found.");
58 | return false;
59 | }
60 |
61 | var viewerPane = PInvoke.FindWindowEx(lister, default, "dopus.listerviewpane", default);
62 | if (viewerPane == default)
63 | {
64 | Console.Error.WriteLine("Viewer pane not found.");
65 | return false;
66 | }
67 |
68 | RECT viewerRect;
69 | if (PInvoke.GetWindowRect(viewerPane, out viewerRect) == 0)
70 | {
71 | Console.Error.WriteLine("Failed to get viewer pane rect.");
72 | return false;
73 | }
74 | // Or MapWindowPoints()
75 | Point pt = new Point(viewerRect.left, viewerRect.top);
76 | PInvoke.ScreenToClient(lister, ref pt);
77 | viewerRect.left = pt.X;
78 | viewerRect.top = pt.Y;
79 | pt = new Point(viewerRect.right, viewerRect.bottom);
80 | PInvoke.ScreenToClient(lister, ref pt);
81 | viewerRect.right = pt.X;
82 | viewerRect.bottom = pt.Y;
83 |
84 | if (PInvoke.SetWindowPos(
85 | viewerPane,
86 | new HWND((IntPtr)0), // HWND_TOP
87 | viewerRect.left,
88 | 0,
89 | viewerRect.Width,
90 | viewerRect.Height + viewerRect.top,
91 | SET_WINDOW_POS_FLAGS.SWP_NOACTIVATE
92 | ) == 0)
93 | {
94 | Console.Error.WriteLine("Failed to set viewer pane pos.");
95 | return false;
96 | }
97 |
98 | // TODO: Resize toolbars
99 |
100 | return true;
101 | }
102 | }
103 | }
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/images/after.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/MaxViewerPane/images/after.png
--------------------------------------------------------------------------------
/Scripts/MaxViewerPane/images/before.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/MaxViewerPane/images/before.png
--------------------------------------------------------------------------------
/Scripts/ObjectViewers/DOpus.js:
--------------------------------------------------------------------------------
1 | //ObjectViewers.DOpus
2 | //Author: Chaoses Ib
3 | //Version: 210821
4 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | function OnClick(clickData){
7 | DOpus.Output(
8 | "language: " + DOpus.language // Same as the * in /home\Language\*.dll
9 | + "\nGetQualifiers(): " + DOpus.GetQualifiers()
10 | + "\nGetClipFormat(): " + DOpus.GetClipFormat()
11 | + "\nGetClip(): '''" + DOpus.GetClip() + "'''"
12 | )
13 | }
--------------------------------------------------------------------------------
/Scripts/OpenFileInWorkspace/OpenFileInWorkspace.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | chcp 65001 >nul
3 |
4 | set dir=%~dp1
5 |
6 | cd /d %dir%
7 | for /f "delims=" %%i in ('git rev-parse --show-toplevel 2^>nul') do (
8 | set dir=%%i
9 | )
10 |
11 | "%LOCALAPPDATA%\Programs\Microsoft VS Code\Code.exe" -n "%dir%" -g %1
12 |
--------------------------------------------------------------------------------
/Scripts/OpenFileInWorkspace/OpenFileInWorkspace.vbs:
--------------------------------------------------------------------------------
1 | ' OpenFileInWorkspace
2 | ' Description: Given a file path, open its parent folder (or Git root) and show the file in VS Code.
3 | ' Version: 240727
4 | ' Author: @Chaoses-Ib
5 | ' Homepage: https://github.com/Chaoses-Ib/IbDOpusScripts
6 |
7 | Set WshShell = CreateObject("WScript.Shell")
8 | strVbsPath = WScript.ScriptFullName
9 | strVbsDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(strVbsPath)
10 | strBatFile = strVbsDir & "\OpenFileInWorkspace.bat"
11 |
12 | WshShell.Run chr(34) & strBatFile & chr(34) & " " & chr(34) & WScript.Arguments(0) & chr(34), 0
13 |
14 | Set WshShell = Nothing
15 |
--------------------------------------------------------------------------------
/Scripts/SizeColByEverything/DynamicWrapperX/dynwrapx32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SizeColByEverything/DynamicWrapperX/dynwrapx32.dll
--------------------------------------------------------------------------------
/Scripts/SizeColByEverything/DynamicWrapperX/dynwrapx64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SizeColByEverything/DynamicWrapperX/dynwrapx64.dll
--------------------------------------------------------------------------------
/Scripts/SizeColByEverything/IPC/Everything32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SizeColByEverything/IPC/Everything32.dll
--------------------------------------------------------------------------------
/Scripts/SizeColByEverything/IPC/Everything64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SizeColByEverything/IPC/Everything64.dll
--------------------------------------------------------------------------------
/Scripts/SizeColByEverything/Preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SizeColByEverything/Preview.png
--------------------------------------------------------------------------------
/Scripts/SizeColByEverything/README.zh-Hans.md:
--------------------------------------------------------------------------------
1 | # SizeColByEvetyhing
2 | 作者:混沌Ib
3 | 版本:210310
4 | Git:https://github.com/Chaoses-Ib/IbDOpusScripts
5 |
6 | 只作参考用途,请使用 [IbDOpusExt](https://github.com/Chaoses-Ib/IbDOpusExt) 的尺寸列替代。
7 |
8 | ## 功能
9 | 为 DO 添加一个 Size 列,通过 Everything 获取文件和文件夹的大小。
10 | 
11 |
12 | ## 已知问题
13 | * 性能较差,3000 个文件需要一分钟多才能显示完毕(受 DO 局限)
14 | * 不支持符号链接和 Junction
15 | * 无法在链接目录内显示文件大小
16 | * 子文件夹是链接目录的话不会计入总大小(受 Ev 局限)
17 | * 文件数量过多时可能会引发崩溃
18 |
19 | 建议只用作偶尔分析硬盘占用的工具。
20 |
21 | ## 安装步骤
22 | 1. 设置 Everything 索引文件夹大小:
23 | 工具-选项-索引-索引文件夹大小
24 | 1. 安装 Everything IPC 组件
25 | 把 IPC 目录里的 DLL 随便找个地方放着,脚本能调用到就可以
26 | 1. 安装 DynamicWrapperX
27 | 把 DynamicWrapperX 目录里的 DLL 随便找个地方放着,然后用管理员权限在那里打开命令行,执行 regsvr32 dynwrapx64.dll(或者 regsvr32 dynwrapx32.dll)
28 | 1. 安装脚本
29 | DOpus:配置-工具栏-脚本-导入,把 SizeColByEverything.js 拖进去。
30 | 点击编辑,把第10行的路径替换为你在第二步把 DLL 放置到的路径,注意反斜杠要写成 \\\\。
--------------------------------------------------------------------------------
/Scripts/SizeColByEverything/SizeColByEvetyhing.js:
--------------------------------------------------------------------------------
1 | //SizeColByEvetyhing
2 | //Description: Add a size column which retrieves sizes of files and folders from Everything. (This script is for reference only. Use [IbDOpusExt](https://github.com/Chaoses-Ib/IbDOpusExt)'s Size column instead.)
3 | //Author: Chaoses Ib
4 | //Version: 210807
5 | //Git: https://github.com/Chaoses-Ib/IbDOpusScripts
6 |
7 | var cacheQuery = "";
8 | var cacheMap = DOpus.Create().Map();
9 |
10 | var path = "C:\\Program Files\\Everything\\IPC\\Everything64.dll"
11 | var DWX = new ActiveXObject("DynamicWrapperX");
12 | DWX.Register(path, "Everything_SetSearchW", "i=w");
13 | DWX.Register(path, "Everything_SetRequestFlags", "i=u");
14 | DWX.Register(path, "Everything_QueryW", "i=l", "r=l");
15 | DWX.Register(path, "Everything_GetNumResults", "r=u");
16 | DWX.Register(path, "Everything_GetResultSize", "i=up", "r=l");
17 | DWX.Register(path, "Everything_GetResultFileNameW", "i=u", "r=w");
18 | //DWX.Register(path, "Everything_SetSort", "i=u");
19 | //DWX.Register(path, "Everything_GetLastError", "r=u");
20 |
21 | function OnInit(initData)
22 | {
23 | initData.name = "SizeColFromEverything";
24 | initData.version = "1.0";
25 | initData.copyright = "混沌 Ib";
26 | initData.desc = "";
27 | initData.default_enable = true;
28 | initData.min_version = "12.0";
29 |
30 | var col = initData.AddColumn();
31 | col.name = "Size_ev";
32 | col.method = "OnSize_ev";
33 | col.label = "Size (ev)";
34 | col.justify = "left";
35 | col.autogroup = true;
36 | col.type = "size";
37 | }
38 |
39 | function OnSize_ev(scriptColData)
40 | {
41 | var tabPath = String(scriptColData.tab.path);
42 | if(cacheQuery != tabPath) evQuery(tabPath);
43 | if(cacheMap.exists(scriptColData.item.name))
44 | scriptColData.value = cacheMap(scriptColData.item.name);
45 | }
46 |
47 | function evQuery(tabPath){
48 | DOpus.Output("Init");
49 | cacheMap.clear(); //最短存活
50 | DWX.Everything_SetSearchW('infolder:"' + tabPath +'"');
51 | //DOpus.Output('infolder:"' + tabPath +'"')
52 | DWX.Everything_SetRequestFlags(1+16);
53 | if(!DWX.Everything_QueryW(1)) return;
54 |
55 | var num = DWX.Everything_GetNumResults();
56 | //DOpus.Output(DWX.Everything_GetLastError() + ", " + num);
57 | var size_addr = DWX.MemAlloc(16); //最短存活
58 | for(var i=0; i
2 |
3 |
4 | toolbar
5 |
6 |
7 |
8 |
9 | #thumbnailsize
10 |
11 | SmartThumbnailSize SIZE=32
12 |
13 |
14 |
15 |
16 | #newcommand
17 |
18 | SmartThumbnailSize SIZE=64
19 |
20 |
21 |
22 |
23 | #newcommand
24 |
25 | SmartThumbnailSize SIZE=128
26 |
27 |
28 |
29 |
30 | #newcommand
31 |
32 | SmartThumbnailSize SIZE=256
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Scripts/SmartThumbnailSize/SmartThumbnailSize.js:
--------------------------------------------------------------------------------
1 | function OnInit(scriptInitData)
2 | {
3 | scriptInitData.name = "SmartThumbnailSize";
4 | scriptInitData.desc = DOpus.strings.Get('description');
5 | scriptInitData.version = "0.3";
6 | scriptInitData.copyright = "Chaoses Ib";
7 | scriptInitData.url = "https://github.com/Chaoses-Ib/IbDOpusScripts";
8 | scriptInitData.default_enable = true;
9 |
10 | var config_desc = DOpus.Create().Map();
11 | scriptInitData.config.DefaultThumbnailSize = 256;
12 | config_desc("DefaultThumbnailSize") = DOpus.strings.Get('defaultThumbnailSize');
13 | scriptInitData.config.NumberOfImagesToDetect = 3;
14 | config_desc("NumberOfImagesToDetect") = DOpus.strings.Get('numberOfImagesToDetect');
15 | scriptInitData.config_desc = config_desc;
16 |
17 | var cmd = scriptInitData.AddCommand();
18 | cmd.name = "SmartThumbnailSize";
19 | cmd.desc = DOpus.strings.Get('description');
20 | cmd.method = "OnSmartThumbnailSize";
21 | cmd.template = "SIZE/N";
22 | }
23 |
24 | function getFilesImageMetadata(files) {
25 | var images = [];
26 | for (var e = new Enumerator(files); !e.atEnd(); e.moveNext()) {
27 | var file = e.item();
28 | if (file.metadata == "image" || file.metadata == "video") {
29 | images.push(file.metadata.image);
30 | if (images.length >= Script.config.NumberOfImagesToDetect)
31 | break;
32 | }
33 | }
34 | return images;
35 | }
36 |
37 | function adjustThumbnailSize(tab, size) {
38 | if (tab.format.view == "thumbnails") {
39 | var images = [];
40 | if (tab.selected_files.count > 0) {
41 | var selected_images = getFilesImageMetadata(tab.selected_files);
42 | if (selected_images.length > 0)
43 | images = selected_images;
44 | else
45 | images = getFilesImageMetadata(tab.files);
46 | } else {
47 | images = getFilesImageMetadata(tab.files);
48 | }
49 |
50 | // Get the median ratio and the correspoding width and height
51 | var width = 1, height = 1;
52 | if (images.length > 0) {
53 | images.sort(function (a, b) {
54 | return a.picwidth / a.picheight - b.picwidth / b.picheight;
55 | });
56 | median = images[Math.floor(images.length / 2)];
57 | width = median.picwidth;
58 | height = median.picheight;
59 | }
60 |
61 | // Set the thumbnail size
62 | var cmd = DOpus.Create().Command();
63 | cmd.SetSourceTab(tab);
64 | if (width > height) {
65 | height = Math.round(height * size / width);
66 | width = size;
67 | } else {
68 | width = Math.round(width * size / height);
69 | height = size;
70 | }
71 | cmd.RunCommand("Show THUMBNAILSIZE source," + width + "," + height);
72 | }
73 | }
74 |
75 | function OnSmartThumbnailSize(scriptCommandData) {
76 | adjustThumbnailSize(
77 | scriptCommandData.func.sourcetab,
78 | scriptCommandData.func.argsmap.exists("SIZE") ? scriptCommandData.func.argsmap("SIZE") : Script.config.DefaultThumbnailSize
79 | );
80 | }
81 |
82 | function OnDisplayModeChange(displayModeChangeData) {
83 | if (displayModeChangeData.mode == "thumbnails") {
84 | adjustThumbnailSize(displayModeChangeData.tab, Script.config.DefaultThumbnailSize);
85 | }
86 | }
87 |
88 | function OnAfterFolderChange(afterFolderChangeData) {
89 | if (afterFolderChangeData.result) {
90 | adjustThumbnailSize(afterFolderChangeData.tab, Script.config.DefaultThumbnailSize);
91 | }
92 | }
93 |
94 | ==SCRIPT RESOURCES
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/Scripts/SmartThumbnailSize/images/after.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SmartThumbnailSize/images/after.png
--------------------------------------------------------------------------------
/Scripts/SmartThumbnailSize/images/before.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SmartThumbnailSize/images/before.png
--------------------------------------------------------------------------------
/Scripts/SmartThumbnailSize/images/dual.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SmartThumbnailSize/images/dual.png
--------------------------------------------------------------------------------
/Scripts/SmartThumbnailSize/images/toolbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/SmartThumbnailSize/images/toolbar.png
--------------------------------------------------------------------------------
/Scripts/TabColorizer/TabColorizer.js:
--------------------------------------------------------------------------------
1 | function OnInit(scriptInitData) {
2 | scriptInitData.name = "TabColorizer";
3 | scriptInitData.desc = DOpus.strings.Get("description");
4 | scriptInitData.version = "0.1.1";
5 | scriptInitData.copyright = "Chaoses Ib";
6 | scriptInitData.url = "https://github.com/Chaoses-Ib/IbDOpusScripts";
7 | scriptInitData.default_enable = true;
8 |
9 | updateLabels(scriptInitData);
10 | }
11 |
12 | function updateLabels(scriptInitData) {
13 | var colorGroupsPath = DOpus.FSUtil.Resolve("/dopusdata\\ConfigFiles\\colorgroups.oxc");
14 |
15 | var doc = new ActiveXObject("Msxml2.DOMDocument.6.0");
16 | doc.async = false;
17 | doc.resolveExternals = false;
18 | doc.validateOnParse = false;
19 | doc.load(String(colorGroupsPath).replace(/\\/g, "/"));
20 |
21 | var colorgroups = doc.getElementsByTagName("colorgroups")[0];
22 | var groups = colorgroups.getElementsByTagName("groups")[0].childNodes;
23 |
24 | var labelNames = DOpus.Create().Vector(groups.length);
25 | var labelFgs = DOpus.Create().Vector(groups.length);
26 | var labelBgs = DOpus.Create().Vector(groups.length);
27 | var labelSelFgs = DOpus.Create().Vector(groups.length);
28 | var labelSelBgs = DOpus.Create().Vector(groups.length);
29 | for (var i = 0; i < groups.length; i++) {
30 | var group = groups[i];
31 | labelNames[i] = group.getAttribute("name");
32 | labelFgs[i] = group.getAttribute("fg");
33 | labelBgs[i] = group.getAttribute("bg");
34 | labelSelFgs[i] = group.getAttribute("sel_fg");
35 | labelSelBgs[i] = group.getAttribute("sel_bg");
36 | //DOpus.Output("Added label: " + labelNames[i]);
37 | }
38 |
39 | scriptInitData.Vars.Set("labelNames", labelNames);
40 | scriptInitData.Vars.Set("labelFgs", labelFgs);
41 | scriptInitData.Vars.Set("labelBgs", labelBgs);
42 | scriptInitData.Vars.Set("labelSelFgs", labelSelFgs);
43 | scriptInitData.Vars.Set("labelSelBgs", labelSelBgs);
44 | }
45 |
46 | function colorizeTab(tab, newTab) {
47 | var item = DOpus.FSUtil.GetItem(tab.path);
48 | var itemLabels = item.Labels();
49 | if (itemLabels.length == 0) {
50 | if (!newTab) {
51 | // Tab.color is read-only
52 | var cmd = DOpus.Create().Command();
53 | cmd.SetSourceTab(tab);
54 | cmd.RunCommand("Go TABCOLOR=reset");
55 | }
56 | return;
57 | }
58 |
59 | var labelNames = Script.Vars.Get("labelNames");
60 | var labelFgs = Script.Vars.Get("labelFgs");
61 | var labelBgs = Script.Vars.Get("labelBgs");
62 | var labelSelFgs = Script.Vars.Get("labelSelFgs");
63 | var labelSelBgs = Script.Vars.Get("labelSelBgs");
64 | //DOpus.Output(labelNames.length);
65 |
66 | for (var i = 0; i < itemLabels.length; i++) {
67 | var label = itemLabels[i];
68 | for (var i = 0; i < labelNames.length; i++) {
69 | if (labelNames(i) == label) {
70 | var color = chooseColor(labelFgs(i), labelBgs(i), labelSelFgs(i), labelSelBgs(i));
71 | if (color != "none") {
72 | // Tab.color is read-only
73 | var cmd = DOpus.Create().Command();
74 | cmd.SetSourceTab(tab);
75 | cmd.RunCommand("Go TABCOLOR " + labelFgs(i));
76 | return;
77 | }
78 | break;
79 | }
80 | }
81 | }
82 | }
83 |
84 | function chooseColor(fg, bg, selFg, selBg) {
85 | if (fg != "none")
86 | return fg;
87 | else if (bg != "none")
88 | return bg;
89 | else if (selFg != "none")
90 | return selFg;
91 | else if (selBg != "none")
92 | return selBg;
93 | else
94 | return "none";
95 | }
96 |
97 | function OnOpenTab(openTabData) {
98 | if (openTabData.tab.path != "") {
99 | colorizeTab(openTabData.tab, true);
100 | }
101 | }
102 |
103 | function OnAfterFolderChange(afterFolderChangeData) {
104 | if (afterFolderChangeData.result) {
105 | colorizeTab(afterFolderChangeData.tab, false);
106 | }
107 | }
108 |
109 | ==SCRIPT RESOURCES
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/Scripts/TabColorizer/images/after.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/TabColorizer/images/after.png
--------------------------------------------------------------------------------
/Scripts/TabColorizer/images/before.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Chaoses-Ib/IbDOpusScripts/2818bdc706c6ff25c483c9b57ca756b40eebebff/Scripts/TabColorizer/images/before.png
--------------------------------------------------------------------------------