3 <implements type="Automation" id="dispatcher">
4 <property name="PluginEvent">
7 <property name="PluginDescription">
10 <method name="MakeUpper"/>
11 <method name="MakeLower"/>
12 <method name="SortAscending"/>
13 <method name="SortDescending"/>
14 <method name="ExecFilterCommand"/>
17 <script language="VBS">
20 Function get_PluginEvent()
21 get_PluginEvent = "EDITOR_SCRIPT"
24 Function get_PluginDescription()
25 get_PluginDescription = "Basic text functions for the context menu"
29 ' transformation functions
30 Function MakeUpper(Text)
31 MakeUpper = UCase(Text)
34 Function MakeLower(Text)
35 MakeLower = LCase(Text)
38 Function ExecFilterCommand(Text)
40 cmd = InputBox("
\8c»
\8dÝ
\82Ì
\91I
\91ð
\94Í
\88Í
\82Ì
\95¶
\8e\9a\97ñ
\82ð
\83t
\83B
\83\8b\83^
\83R
\83}
\83\93\83h
\82Å
\8f\88\97\9d\82µ
\82½
\8c\8b\89Ê
\82Å
\92u
\8a·
\82µ
\82Ü
\82·
\81B
\83R
\83}
\83\93\83h
\82ð
\93ü
\97Í
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B")
42 Err.Raise 30001, "
\83L
\83\83\83\93\83Z
\83\8b\82³
\82ê
\82Ü
\82µ
\82½"
50 Set wsh = CreateObject("WScript.Shell")
51 path = wsh.ExpandEnvironmentStrings("%TEMP%\_winmerge_addin_temp_.txt")
55 Set fso = CreateObject("Scripting.FileSystemObject")
56 Set ts = fso.CreateTextFile(path)
64 Set exe = wsh.Exec("cmd /c type """ & path & """ | " & cmd & " 2>&1")
65 If exe Is Nothing Then
66 MsgBox "
\83R
\83}
\83\93\83h " & cmd & "
\82Ì
\8eÀ
\8ds
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½:" & Err.Description
71 ExecFilterCommand = ""
72 Do Until exe.StdOut.AtEndOfStream
73 ExecFilterCommand = ExecFilterCommand & exe.StdOut.ReadLine & vbCrLf
83 <script language="JScript">
85 function SortAscending(Text) {
86 return Text.split("\n").sort().join("\n");
89 function SortDescending(Text) {
90 var lines = Text.split("\n");
91 lines.sort(function(a, b) { return a < b ? 1 : -1; });
92 return lines.join("\n");