-
Notifications
You must be signed in to change notification settings - Fork 6
/
PasteInto.dcf
30 lines (30 loc) · 1.46 KB
/
PasteInto.dcf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" separate="yes" textcol="none">
<label>Paste Into</label>
<tip>Paste files into every selected folder</tip>
<icon1>#clippaste</icon1>
<function type="script">
<instruction>@script JScript</instruction>
<instruction>// PasteInto</instruction>
<instruction>// Author: @Chaoses-Ib, @Sanhuaitang</instruction>
<instruction>// Version: 221010</instruction>
<instruction>// Git: https://github.com/Chaoses-Ib/IbDOpusScripts</instruction>
<instruction />
<instruction>function OnClick(clickData)</instruction>
<instruction>{</instruction>
<instruction> var cmd = clickData.func.command</instruction>
<instruction> cmd.deselect = false</instruction>
<instruction> </instruction>
<instruction> var dirs = clickData.func.sourcetab.selected_dirs</instruction>
<instruction> if (dirs.count == 0) {</instruction>
<instruction> DOpus.Output("No folder selected")</instruction>
<instruction> return</instruction>
<instruction> }</instruction>
<instruction> for (var e = new Enumerator(dirs); !e.atEnd(); e.moveNext()) {</instruction>
<instruction> //DOpus.Output(e.item().realpath)</instruction>
<instruction> cmd.SetSource(e.item().realpath) // Not Dest</instruction>
<instruction> cmd.RunCommand("Clipboard PASTE")</instruction>
<instruction> }</instruction>
<instruction>}</instruction>
</function>
</button>