TrembleStarMan

OneCommandDecompiling Code

Jan 2nd, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim c(9999999) As String, v As String, g As Integer
  2. Private Sub Block_Click()
  3. Dim i, a, m As Integer
  4.  
  5. With Command
  6. .SelStart = 1
  7. .SelLength = Len(Command.Text)
  8. .SelBold = False
  9. .SelColor = vbBlack
  10. End With
  11.  
  12. For i = 0 To Block.ListCount - 1
  13.     If Block.Selected(i) = True Then
  14.         a = i
  15.         v = Block.List(a)
  16.         m = 0
  17.         For b = 0 To Len(Command.Text) - Len(Replace(Command.Text, Block.List(a), ""))
  18.             m = InStr(m + Len(Block.List(a)), Command.Text, Block.List(a))
  19.             If m = 0 Then
  20.                 Exit For
  21.             End If
  22.             With Command
  23.             .SelStart = m - 1
  24.             .SelLength = Len(Block.List(a))
  25.             .SelBold = True
  26.             .SelColor = vbRed
  27.             End With
  28.         Next
  29.     End If
  30. Next
  31.  
  32. JX.ListIndex = -1
  33. Scoreb.ListIndex = -1
  34. Tell.ListIndex = -1
  35. Dis.ListIndex = -1
  36. Did.ListIndex = -1
  37. Cmd.ListIndex = -1
  38. End Sub
  39.  
  40. Private Sub Check1_Click()
  41. Dim a As Integer
  42.  
  43. If Check1.Value = 1 Then
  44.     g = 2
  45.     a = MsgBox("你已经选择了数字顺序" & Chr(13) & Chr(10) & "会显示顺序的数值", , "顺序")
  46. ElseIf Check1.Value = 0 Then
  47.     g = 1
  48.     a = MsgBox("你已经选择了无顺序" & Chr(13) & Chr(10) & "不会显示顺序的数值", , "顺序")
  49. End If
  50. End Sub
  51.  
  52. Private Sub Cmd_Click()
  53. Dim i, a, m As Integer
  54.  
  55. With Command
  56. .SelStart = 1
  57. .SelLength = Len(Command.Text)
  58. .SelBold = False
  59. .SelColor = vbBlack
  60. End With
  61.  
  62. For i = 0 To Cmd.ListCount - 1
  63.     If Cmd.Selected(i) = True Then
  64.         a = i
  65.         v = Cmd.List(a)
  66.         m = 0
  67.         For b = 0 To Len(Command.Text) - Len(Replace(Command.Text, Cmd.List(a), ""))
  68.             m = InStr(m + Len(Cmd.List(a)), Command.Text, Cmd.List(a))
  69.             If m = 0 Then
  70.                 Exit For
  71.             End If
  72.             With Command
  73.             .SelStart = m - 1
  74.             .SelLength = Len(Cmd.List(a))
  75.             .SelBold = True
  76.             .SelColor = vbRed
  77.             End With
  78.         Next
  79.     End If
  80. Next
  81.  
  82. JX.ListIndex = -1
  83. Scoreb.ListIndex = -1
  84. Tell.ListIndex = -1
  85. Dis.ListIndex = -1
  86. Did.ListIndex = -1
  87. End Sub
  88.  
  89. Private Sub Command1_Click()
  90. Dim a, i, b, d, e(100), f, j, h, k As Integer
  91. Dim s As String
  92. If Command.Text = "" Then
  93.     a = MsgBox("你没有输入指令", , "指令错误")
  94.     GoTo 1
  95. End If
  96.  
  97. JX.Clear
  98. v = Command.Text
  99.  
  100. Command.Text = Replace(Command.Text, "\", "")
  101. Command.Text = Replace(Command.Text, """", "")
  102. Command.Text = Replace(Command.Text, vbCrLf, "")
  103. 'Command.Text = Replace(Command.Text, ",id:FallingSand,Block:iron_block,Time:1}", "")      曾经避免干扰项
  104.  
  105.  
  106.  
  107.  'All
  108.    b = 1
  109.     d = 1
  110.     k = 0
  111.     For i = 1 To Len(Command.Text)
  112.         'If InStr(d + 11, Command.Text, ",id:Control") < InStr(d + 11, Command.Text, "Command:") And InStr(d + 11, Command.Text, ",id:Control") < InStr(InStr(d + 11, Command.Text, ",id:Control") + 1, Command.Text, "Command:") Then
  113.            'Command.Text = Replace(Command.Text, ",id:Control", Space(Len("id:Control")), InStr(d + 11, Command.Text, ",id:Control") + 1)
  114.        'End If    '这段代码能够检测cp OneCommand中单执行指令
  115.  
  116.  
  117.            
  118. '        If InStr(d + 1, Command.Text, ",id:Control") > 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") <> 0 And InStr(d + 1, Command.Text, "},id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",id:Control") < InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") > InStr(d + 1, Command.Text, ",id:Control") And InStr(d + 1, Command.Text, "},id:FallingSand") > InStr(d + 1, Command.Text, ",id:Control") Then
  119. '            d = InStr(d + 1, Command.Text, ",id:Control")
  120. '            b = InStrRev(Command.Text, "Command:", d)
  121. '        ElseIf InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") > 0 And InStr(d + 1, Command.Text, ",id:Control") <> 0 And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") <> 0 And InStr(d + 1, Command.Text, "},id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",id:Control") > InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") > InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") And InStr(d + 1, Command.Text, "},id:FallingSand") > InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") Then
  122. '            d = InStr(d + 1, Command.Text, "},Riding:{id:FallingSand")
  123. '            b = InStrRev(Command.Text, "Command:", d)
  124. '        ElseIf InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") > 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",id:Control") <> 0 And InStr(d + 1, Command.Text, "},id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",id:Control") > InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") < InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") And InStr(d + 1, Command.Text, "},id:FallingSand") > InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") Then
  125. '            d = InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock")
  126. '            b = InStrRev(Command.Text, "Command:", d)
  127. '        ElseIf InStr(d + 1, Command.Text, "},id:FallingSand") > 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",id:Control") <> 0 And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") <> 0 And InStr(d + 1, Command.Text, "},id:FallingSand") < InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") And InStr(d + 1, Command.Text, "},id:FallingSand") < InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") And InStr(d + 1, Command.Text, "},id:FallingSand") < InStr(d + 1, Command.Text, ",id:Control") Then
  128. '            d = InStr(d + 1, Command.Text, "},id:FallingSand")
  129. '            b = InStrRev(Command.Text, "Command:", d)
  130. '
  131. '        ElseIf InStr(d + 1, Command.Text, ",id:Control") > 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",id;Control") < InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") Or InStr(d + 1, Command.Text, ",id:Control") > 0 And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") <> 0 And InStr(d + 1, Command.Text, ",id;Control") < InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") Or InStr(d + 1, Command.Text, ",id:Control") > 0 And InStr(d + 1, Command.Text, "},id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",id;Control") < InStr(d + 1, Command.Text, "},id:FallingSand") Then
  132. '            d = InStr(d + 1, Command.Text, ",id:Control")
  133. '            b = InStrRev(Command.Text, "Command:", d)
  134. '        ElseIf InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") > 0 And InStr(d + 1, Command.Text, ",id;Control") <> 0 And InStr(d + 1, Command.Text, ",id;Control") > InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") Or InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") > 0 And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") <> 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") < InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") Or InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") > 0 And InStr(d + 1, Command.Text, "},id:FallingSand") <> 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") < InStr(d + 1, Command.Text, "},id:FallingSand") Then
  135. '            d = InStr(d + 1, Command.Text, "},Riding:{id:FallingSand")
  136. '            b = InStrRev(Command.Text, "Command:", d)
  137. '        ElseIf InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") > 0 And InStr(d + 1, Command.Text, ",id;Control") <> 0 And InStr(d + 1, Command.Text, ",id;Control") > InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") Or InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") > 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") <> 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") > InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") Or InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") > 0 And InStr(d + 1, Command.Text, "},id:FallingSand") <> 0 And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") < InStr(d + 1, Command.Text, "},id:FallingSand") Then
  138. '            d = InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock")
  139. '            b = InStrRev(Command.Text, "Command:", d)
  140. '        ElseIf InStr(d + 1, Command.Text, "},id:FallingSand") > 0 And InStr(d + 1, Command.Text, ",id;Control") <> 0 And InStr(d + 1, Command.Text, ",id;Control") > InStr(d + 1, Command.Text, "},id:FallingSand") Or InStr(d + 1, Command.Text, "},id:FallingSand") > 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") <> 0 And InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") > InStr(d + 1, Command.Text, "},id:FallingSand") Or InStr(d + 1, Command.Text, "},id:FallingSand") > 0 And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") <> 0 And InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") > InStr(d + 1, Command.Text, "},id:FallingSand") Then
  141. '            d = InStr(d + 1, Command.Text, "},id:FallingSand")
  142. '            b = InStrRev(Command.Text, "Command:", d)
  143. '
  144. '        ElseIf InStr(d + 1, Command.Text, ",id;Control") <> 0 Then
  145. '            d = InStr(d + 1, Command.Text, ",id:Control")
  146. '            b = InStrRev(Command.Text, "Command:", d)
  147. '        ElseIf InStr(d + 1, Command.Text, "},Riding:{id:FallingSand") <> 0 Then
  148. '            d = InStr(d + 1, Command.Text, "},Riding:{id:FallingSand")
  149. '            b = InStrRev(Command.Text, "Command:", d)
  150. '        ElseIf InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock") <> 0 Then
  151. '            d = InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock")
  152. '            b = InStrRev(Command.Text, "Command:", d)
  153. '        ElseIf InStr(d + 1, Command.Text, "},id:FallingSand") <> 0 Then
  154. '            d = InStr(d + 1, Command.Text, "},id:FallingSand")
  155. '            b = InStrRev(Command.Text, "Command:", d)
  156. '        End If   这段代码是no auto的主要算法
  157.  
  158.         e(0) = InStr(d + 1, Command.Text, ",id:Control")
  159.         e(1) = InStr(d + 1, Command.Text, "},Riding:{id:FallingSand")
  160.         e(2) = InStr(d + 1, Command.Text, ",Riding:{id:MinecartCommandBlock")
  161.         e(3) = InStr(d + 1, Command.Text, "},id:FallingSand")
  162.         e(4) = InStr(d + 1, Command.Text, "},Time:1")
  163.         e(5) = InStr(d + 1, Command.Text, "},Block:command_block")
  164.        
  165.         For f = 0 To 5
  166.             If e(f) > 0 Then
  167.                 h = e(f)
  168.                 Exit For
  169.             End If
  170.         Next
  171.         For j = 0 To 5
  172.             If e(j) = 0 Then
  173.                 j = j + 1
  174.             ElseIf e(j) < h Then
  175.                 h = e(j)
  176.             End If
  177.         Next
  178.         d = h                               'auto算法,得到最终值
  179.        
  180.         If d = 0 Then
  181.             GoTo 1
  182.         End If
  183.         b = InStrRev(Command.Text, "Command:", d)
  184.        
  185.         If k = b Then
  186.             GoTo 3
  187.         Else
  188.             k = b
  189.         End If                              '将从属指令外层去除
  190.        
  191.         If InStr(d + 32, Command.Text, ",Riding:{id:MinecartCommandBlock") = 0 And InStr(d + 24, Command.Text, "},Riding:{id:FallingSand") = 0 And InStr(d + 11, Command.Text, ",id:Control") = 0 And InStr(d + 16, Command.Text, "},id:FallingSand") = 0 And InStr(d + 8, Command.Text, "},Time:1") = 0 Then
  192.             Exit For
  193.         End If
  194.         If d - b - 8 < 0 Then
  195.             a = MsgBox("指令解析完成", , "完成")
  196.             GoTo 1
  197.         End If
  198.        
  199.         s = Mid(Command.Text, b + 8, d - b - 8)
  200.         c(i) = s
  201.         JX.AddItem c(i)
  202. 3:
  203.     Next
  204.  
  205. 'If InStr(Command.Text, "summon MinecartCommandBlock") > 0 And InStr(Command.Text, "summon MinecartCommandBlock") < InStr(Command.Text, "{") Then 'Only Minecart
  206. '    b = 0
  207. '    d = 0
  208. '    For i = 1 To Len(Command.Text) - Len(Replace(Command.Text, ",Riding:{id:MinecartCommandBlock", ""))
  209. '        f = 1
  210. '        If InStr(d + 11, Command.Text, ",id:Control") > 0 And f = 1 Then
  211. '            d = InStr(d + 11, Command.Text, ",id:Control")
  212. '            b = InStrRev(Command.Text, "Command:", d)
  213. '        ElseIf InStr(d + 24, Command.Text, "},Riding:{id:FallingSand") > 0 And f = 1 Then
  214. '            b = InStr(b + 8, Command.Text, "Command:")
  215. '            d = InStr(b, Command.Text, "},Riding:{id:FallingSand")
  216. '        ElseIf InStr(d + 32, Command.Text, ",Riding:{id:MinecartCommandBlock") > 0 And f = 1 Then
  217. '            b = InStr(b + 8, Command.Text, "Command:")
  218. '            d = InStr(b, Command.Text, ",Riding:{id:MinecartCommandBlock")
  219. '        End If
  220. '
  221. '        If InStr(d + 32, Command.Text, ",Riding:{id:MinecartCommandBlock") = 0 And InStr(d + 24, Command.Text, "},Riding:{id:FallingSand") = 0 And InStr(d + 11, Command.Text, ",id:Control") = 0 Then
  222. '            Exit For
  223. '        End If
  224. '
  225. '        If d - b - 8 < 0 Then
  226. '            a = MsgBox("指令解析完成", , "完成")
  227. '            GoTo 1
  228. '        End If
  229. '
  230. '        s = Mid(Command.Text, b + 8, d - b - 8)
  231. '        c(i) = s
  232. '        If InStr(s, ",id:Control") > 0 Then
  233. '            c(i) = Mid(s, InStr(s, ",id:Control" - 1), Len(s) - InStr(s, ",id:Control") + 1)
  234. '        End If
  235. '        JX.AddItem c(i)
  236. '    Next
  237. '    GoTo 1                                 'Only Minecart
  238.  
  239. 'ElseIf InStr(Command.Text, ",Riding:{id:MinecartCommandBlock,Command:") > 0 And InStr(Command.Text, "summon FallingSand") < InStr(Command.Text, "{") Then 'OneCommand Spawner
  240. '    b = 0
  241. '    d = 0
  242. '    For i = 1 To Len(Command.Text) - Len(Replace(Command.Text, ",Riding:{id:MinecartCommandBlock", "")) + Len(Command.Text) - Len(Replace(Command.Text, "},Riding:{id:FallingSand", ""))
  243. '        f = 1
  244. '
  245. '        If InStr(d + 11, Command.Text, ",id:Control") > 0 And f = 1 Then
  246. '            d = InStr(d + 11, Command.Text, ",id:Control")
  247. '            b = InStrRev(Command.Text, "Command:", d)
  248. '        ElseIf InStr(d + 24, Command.Text, "},Riding:{id:FallingSand") > 0 And f = 1 Then
  249. '            b = InStr(b + 8, Command.Text, "Command:")
  250. '            d = InStr(b, Command.Text, "},Riding:{id:FallingSand")
  251. '        ElseIf InStr(d + 32, Command.Text, ",Riding:{id:MinecartCommandBlock") > 0 And f = 1 Then
  252. '            b = InStr(b + 8, Command.Text, "Command:")
  253. '            d = InStr(b, Command.Text, ",Riding:{id:MinecartCommandBlock")
  254. '        End If
  255. '
  256. '        If InStr(d + 32, Command.Text, ",Riding:{id:MinecartCommandBlock") = 0 And InStr(d + 24, Command.Text, "},Riding:{id:FallingSand") = 0 And InStr(d + 11, Command.Text, ",id:Control") = 0 Then
  257. '            Exit For
  258. '        End If
  259. '        If d - b - 8 < 0 Then
  260. '            a = MsgBox("指令解析完成", , "完成")
  261. '            GoTo 1
  262. '        End If
  263. '
  264. '        s = Mid(Command.Text, b + 8, d - b - 8)
  265. '        c(i) = s
  266. '        If InStr(s, ",id:Control") > 0 Then
  267. '            c(i) = Mid(s, InStr(s, ",id:Control" - 1), Len(s) - InStr(s, ",id:Control") + 1)
  268. '        End If
  269. '        JX.AddItem c(i)
  270. '    Next
  271. '    GoTo 1                             'Only Oocss
  272.  
  273.  
  274. For i = 0 To JX.ListCount
  275.     JX.List(i) = Replace(JX.List(i), ",id:Control},id:FallingSand,Block:command_block,Time:1}", "")
  276.     JX.List(i) = Replace(JX.List(i), "},Time:1,DropItem:0}}}}}}}}", "")
  277. Next                                                            '将从属项删除
  278.  
  279. For i = 0 To JX.ListCount - 2
  280.         If i > JX.ListCount - 1 Then Exit For
  281.     For j = (i + 1) To JX.ListCount - 1
  282.             If j > JX.ListCount - 1 Then Exit For
  283.             If JX.List(i) = JX.List(j) Then
  284.                 JX.RemoveItem j
  285.             End If
  286.     Next
  287. Next                                                            '将重复项删除
  288.  
  289. a = MsgBox("已经完成解析指令" & Chr(13) & Chr(10) & "可以通过'分化指令'按钮优化指令和分化指令", , "完成")
  290. 1:
  291. End Sub
  292.  
  293. Private Sub Command10_Click()
  294. Dim a As Integer
  295. Cmd.Clear
  296. Tell.Clear
  297. Scoreb.Clear
  298. Block.Clear
  299. Dis.Clear
  300. Did.Clear
  301.  
  302. a = MsgBox("已经清空", , "清空")
  303. End Sub
  304.  
  305. Private Sub Command2_Click()
  306. Dim a As Integer
  307.  
  308. Clipboard.Clear
  309. Clipboard.SetText v
  310. a = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  311.  
  312. End Sub
  313.  
  314. Private Sub Command3_Click()
  315. Dim i As Integer, b As Integer
  316. JX.Clear
  317. v = ""
  318. b = MsgBox("已经清空", , "清空")
  319. End Sub
  320.  
  321. Private Sub Command4_Click()
  322. Dim a As String, i As Integer, b As Integer
  323.  
  324. a = ""
  325. a = a + "所有指令:" & Chr(13) & Chr(10)
  326. If g = 1 Then
  327.     For i = 0 To JX.ListCount - 1
  328.         If i = JX.ListCount - 1 Then
  329.             a = a + JX.List(i)
  330.             Exit For
  331.         End If
  332.         a = a + JX.List(i) & Chr(13) & Chr(10)
  333.     Next
  334. ElseIf g = 2 Then
  335.     For i = 0 To JX.ListCount - 1
  336.         If i = JX.ListCount - 1 Then
  337.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & JX.List(i)
  338.             Exit For
  339.         End If
  340.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & JX.List(i) & Chr(13) & Chr(10)
  341.     Next
  342. End If
  343.  
  344. Clipboard.Clear
  345. Clipboard.SetText a
  346. b = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  347.  
  348. End Sub
  349.  
  350. Private Sub Command5_Click()
  351. Dim a As Integer
  352. Command.Text = Clipboard.GetText
  353. a = MsgBox("已经粘贴OneCommand指令", , "粘贴成功")
  354. End Sub
  355.  
  356. Private Sub Command6_Click()
  357. Dim i As Integer, a As String, b(1000) As String, c(1000) As String, d As Integer
  358. Tell.Clear
  359. Block.Clear
  360. Scoreb.Clear
  361. Dis.Clear
  362. Did.Clear
  363.  
  364. For i = 0 To JX.ListCount - 1
  365.     a = Replace(JX.List(i), " ", "")
  366.     If InStr(a, "tellraw") = 1 Or InStr(a, "/tellraw") = 1 Then
  367.         Tell.AddItem JX.List(i)
  368.     ElseIf InStr(a, "say") = 1 Or InStr(a, "/say") = 1 Then
  369.         Tell.AddItem JX.List(i)
  370.     ElseIf InStr(a, "fill") = 1 Or InStr(a, "/fill") = 1 Then
  371.         Block.AddItem JX.List(i)
  372.         JX.List(i) = Replace(JX.List(i), ",id:Control", "")
  373.         If InStr(JX.List(i), "},Time:1") > 0 Then
  374.             JX.List(i) = Mid(JX.List(i), 1, InStr(JX.List(i), "},Time:1") - 1)
  375.         End If
  376.     ElseIf InStr(a, "setblock") = 1 Or InStr(a, "/setblock") = 1 Then
  377.         Block.AddItem JX.List(i)
  378.    
  379.     ElseIf InStr(JX.List(i), "scoreboard objectives add") = 1 Or InStr(JX.List(i), "/scoreboard objectives add") = 1 Then
  380.         JX.List(i) = Replace(JX.List(i), ",id:Control", "")
  381.         JX.List(i) = Replace(JX.List(i), "},Time:1", "")
  382.         b(i) = Mid(JX.List(i), InStr(JX.List(i), "add") + 4, InStr(InStr(JX.List(i), "add") + 4, JX.List(i), " ") - InStr(JX.List(i), "add") - 4)
  383.             For d = 0 To i - 1
  384.                 If b(i) = b(d) Then
  385.                     JX.RemoveItem (i)
  386.                     GoTo 2
  387.                 End If
  388.             Next
  389.         Scoreb.AddItem JX.List(i)
  390.         c(i) = Mid(JX.List(i), InStr(InStr(JX.List(i), "add") + 4, JX.List(i), " ") + 1, Len(JX.List(i)) - InStr(InStr(JX.List(i), "add") + 4, JX.List(i), " "))
  391.         Dis.AddItem b(i)
  392.         Did.AddItem c(i)
  393.     Else
  394.         Cmd.AddItem JX.List(i)
  395.     End If
  396. 2:
  397. Next
  398. a = MsgBox("已经完成优化与分化指令" & Chr(13) & Chr(10) & "可以通过鼠标左击选中一段指令" & Chr(13) & Chr(10) & "可以通过'复制指令'按钮复制选中指令指令", , "完成")
  399. End Sub
  400.  
  401. Private Sub Command7_Click()
  402. Dim a As String, i As Integer
  403. a = ""
  404.  
  405. If g = 1 Then
  406.     a = a + "文字效果:" & Chr(13) & Chr(10)
  407.     For i = 0 To Tell.ListCount - 1
  408.         If i = Tell.ListCount - 1 Then
  409.             a = a + Tell.List(i)
  410.             Exit For
  411.         End If
  412.         a = a + Tell.List(i) & Chr(13) & Chr(10)
  413.     Next
  414.     a = a & Chr(13) & Chr(10) & "方块效果:" & Chr(13) & Chr(10)
  415.     For i = 0 To Block.ListCount - 1
  416.         If i = Block.ListCount - 1 Then
  417.             a = a + Block.List(i)
  418.             Exit For
  419.         End If
  420.         a = a + Block.List(i) & Chr(13) & Chr(10)
  421.     Next
  422.     a = a & Chr(13) & Chr(10) & "计分板添加:" & Chr(13) & Chr(10)
  423.     For i = 0 To Scoreb.ListCount - 1
  424.         If i = Scoreb.ListCount - 1 Then
  425.             a = a + Scoreb.List(i)
  426.             Exit For
  427.         End If
  428.         a = a + Scoreb.List(i) & Chr(13) & Chr(10)
  429.     Next
  430.     a = a & Chr(13) & Chr(10) & "计分板列表:" & Chr(13) & Chr(10)
  431.     For i = 0 To Dis.ListCount - 1
  432.         If i = Scoreb.ListCount - 1 Then
  433.             a = a + Dis.List(i) & vbTab & Did.List(i)
  434.             Exit For
  435.         End If
  436.         a = a + Dis.List(i) & vbTab & Did.List(i) & Chr(13) & Chr(10)
  437.     Next
  438.     a = a & Chr(13) & Chr(10) & "全部实意指令:" & Chr(13) & Chr(10)
  439.     For i = 0 To Cmd.ListCount - 1
  440.         If i = Cmd.ListCount - 1 Then
  441.             a = a + Cmd.List(i)
  442.             Exit For
  443.         End If
  444.         a = a + Cmd.List(i) & Chr(13) & Chr(10)
  445.     Next
  446. End If
  447. If g = 2 Then
  448.     a = a + "文字效果:" & Chr(13) & Chr(10)
  449.     For i = 0 To Tell.ListCount - 1
  450.         If i = Tell.ListCount - 1 Then
  451.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Tell.List(i)
  452.             Exit For
  453.         End If
  454.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Tell.List(i) & Chr(13) & Chr(10)
  455.     Next
  456.     a = a & Chr(13) & Chr(10) & "方块效果:" & Chr(13) & Chr(10)
  457.     For i = 0 To Block.ListCount - 1
  458.         If i = Block.ListCount - 1 Then
  459.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Block.List(i)
  460.             Exit For
  461.         End If
  462.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Block.List(i) & Chr(13) & Chr(10)
  463.     Next
  464.     a = a & Chr(13) & Chr(10) & "计分板添加:" & Chr(13) & Chr(10)
  465.     For i = 0 To Scoreb.ListCount - 1
  466.         If i = Scoreb.ListCount - 1 Then
  467.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Scoreb.List(i)
  468.             Exit For
  469.         End If
  470.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Scoreb.List(i) & Chr(13) & Chr(10)
  471.     Next
  472.     a = a & Chr(13) & Chr(10) & "计分板列表:" & Chr(13) & Chr(10)
  473.     For i = 0 To Dis.ListCount - 1
  474.         If i = Scoreb.ListCount - 1 Then
  475.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Dis.List(i) & vbTab & Did.List(i)
  476.             Exit For
  477.         End If
  478.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Dis.List(i) & vbTab & Did.List(i) & Chr(13) & Chr(10)
  479.     Next
  480.     a = a & Chr(13) & Chr(10) & "全部实意指令:" & Chr(13) & Chr(10)
  481.     For i = 0 To Cmd.ListCount - 1
  482.         If i = Cmd.ListCount - 1 Then
  483.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Cmd.List(i)
  484.             Exit For
  485.         End If
  486.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Cmd.List(i) & Chr(13) & Chr(10)
  487.     Next
  488. End If
  489.  
  490.  
  491. Clipboard.Clear
  492. Clipboard.SetText a
  493. b = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  494. End Sub
  495.  
  496. Private Sub Command8_Click()
  497. Dim i, a, b As Integer
  498. b = 0
  499. With Command
  500. .SelStart = 1
  501. .SelLength = Len(Command.Text)
  502. .SelBold = False
  503. .SelColor = vbBlack
  504. End With
  505.  
  506. For i = 0 To Len(Command.Text) - Len(Replace(Command.Text, Fi.Text, ""))
  507.     b = InStr(b + 1, Command.Text, Fi.Text)
  508.     If b <= 0 Then
  509.         Exit For
  510.     End If
  511.     With Command
  512.     .SelStart = b - 1
  513.     .SelLength = Len(Fi.Text)
  514.     .SelBold = True
  515.     .SelColor = vbRed
  516. End With
  517. Next
  518.  
  519. a = MsgBox("寻找完成", , "完成")
  520. End Sub
  521.  
  522. Private Sub Command9_Click()
  523. Dim a As Integer
  524. With Command
  525. .SelStart = 1
  526. .SelLength = Len(Command.Text)
  527. .SelBold = False
  528. .SelColor = vbBlack
  529. End With
  530.  
  531. JX.ListIndex = -1
  532. Scoreb.ListIndex = -1
  533. Block.ListIndex = -1
  534. Dis.ListIndex = -1
  535. Tell.ListIndex = -1
  536. Cmd.ListIndex = -1
  537.  
  538. a = MsgBox("已经清空所有选中", , "清空")
  539. End Sub
  540.  
  541. Private Sub Did_Click()
  542. Dim i, a, m As Integer
  543.  
  544. With Command
  545. .SelStart = 1
  546. .SelLength = Len(Command.Text)
  547. .SelBold = False
  548. .SelColor = vbBlack
  549. End With
  550.  
  551. For i = 0 To Did.ListCount - 1
  552.     If Did.Selected(i) = True Then
  553.         a = i
  554.         v = Did.List(a)
  555.         m = 0
  556.         For b = 0 To Len(Command.Text) - Len(Replace(Command.Text, Did.List(a), ""))
  557.             m = InStr(m + Len(Did.List(a)), Command.Text, Did.List(a))
  558.             If m = 0 Then
  559.                 Exit For
  560.             End If
  561.             With Command
  562.             .SelStart = m - 1
  563.             .SelLength = Len(Did.List(a))
  564.             .SelBold = True
  565.             .SelColor = vbRed
  566.             End With
  567.         Next
  568.     End If
  569. Next
  570.  
  571. JX.ListIndex = -1
  572. Scoreb.ListIndex = -1
  573. Block.ListIndex = -1
  574. Dis.ListIndex = -1
  575. Tell.ListIndex = -1
  576. Cmd.ListIndex = -1
  577. End Sub
  578.  
  579. Private Sub Dis_Click()
  580. Dim i, a, b, m As Integer
  581.  
  582. With Command
  583. .SelStart = 1
  584. .SelLength = Len(Command.Text)
  585. .SelBold = False
  586. .SelColor = vbBlack
  587. End With
  588.  
  589. For i = Dis.ListCount - 1 To 0 Step -1
  590.     If Dis.Selected(i) = True Then
  591.         a = i
  592.         v = Dis.List(a)
  593.         m = 0
  594.         For b = 0 To Len(Command.Text) - Len(Replace(Command.Text, Dis.List(a), ""))
  595.             m = InStr(m + Len(Dis.List(a)), Command.Text, Dis.List(a))
  596.             If m = 0 Then
  597.                 Exit For
  598.             End If
  599.             With Command
  600.             .SelStart = m - 1
  601.             .SelLength = Len(Dis.List(a))
  602.             .SelBold = True
  603.             .SelColor = vbRed
  604.             End With
  605.         Next
  606.     End If
  607. Next
  608.  
  609. JX.ListIndex = -1
  610. Scoreb.ListIndex = -1
  611. Block.ListIndex = -1
  612. Tell.ListIndex = -1
  613. Did.ListIndex = -1
  614. Cmd.ListIndex = -1
  615. End Sub
  616.  
  617. Private Sub Form_Load()
  618. g = 1
  619. Label4.FontSize = 8
  620. End Sub
  621.  
  622. Private Sub JX_Click()
  623. Dim i, a, m As Integer
  624.  
  625. With Command
  626. .SelStart = 1
  627. .SelLength = Len(Command.Text)
  628. .SelBold = False
  629. .SelColor = vbBlack
  630. End With
  631.  
  632. For i = 0 To JX.ListCount - 1
  633.     If JX.Selected(i) = True Then
  634.         a = i
  635.         v = JX.List(a)
  636.         m = 0
  637.         For b = 0 To Len(Command.Text) - Len(Replace(Command.Text, JX.List(a), ""))
  638.             m = InStr(m + Len(JX.List(a)), Command.Text, JX.List(a))
  639.             If m = 0 Then
  640.                 Exit For
  641.             End If
  642.             With Command
  643.             .SelStart = m - 1
  644.             .SelLength = Len(JX.List(a))
  645.             .SelBold = True
  646.             .SelColor = vbRed
  647.             End With
  648.         Next
  649.     End If
  650. Next
  651.  
  652. Tell.ListIndex = -1
  653. Scoreb.ListIndex = -1
  654. Block.ListIndex = -1
  655. Dis.ListIndex = -1
  656. Did.ListIndex = -1
  657. Cmd.ListIndex = -1
  658. End Sub
  659.  
  660. Private Sub JX_DblClick()
  661. Dim a As Integer
  662.  
  663. a = MsgBox(CStr(Val(JX.ListIndex) + 1) & ":" & Chr(13) & Chr(10) & JX.Text, , "所有指令")
  664. Fi.Text = JX.Text
  665. End Sub
  666.  
  667. Private Sub Label15_Click()
  668. Dim a As Integer
  669. a = MsgBox("联系作者或者访问发布网站" & Chr(13) & Chr(10) & "获取更多帮助", , "帮助")
  670. End Sub
  671.  
  672. Private Sub Label16_Click()
  673. Dim a As String, i As Integer, b As Integer
  674.  
  675. a = ""
  676. a = a + "全部实意指令:" & Chr(13) & Chr(10)
  677. For i = 0 To Cmd.ListCount - 1
  678.     If g = 1 Then
  679.     a = a + Cmd.List(i) & Chr(13) & Chr(10)
  680.  
  681.     End If
  682.        
  683.     If g = 2 Then
  684.         If i = Cmd.ListCount - 1 Then
  685.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Cmd.List(i)
  686.         End If
  687.     a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Cmd.List(i)
  688.     End If
  689. Next
  690.  
  691. Clipboard.Clear
  692. Clipboard.SetText a
  693. b = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  694. End Sub
  695.  
  696. Private Sub Tell_DblClick()
  697. Dim a As Integer
  698.  
  699. a = MsgBox(CStr(Val(Tell.ListIndex) + 1) & ":" & Chr(13) & Chr(10) & Tell.Text, , "文字效果指令")
  700. Fi.Text = Tell.Text
  701. End Sub
  702. Private Sub Block_DblClick()
  703. Dim a As Integer
  704.  
  705. a = MsgBox(CStr(Val(Block.ListIndex) + 1) & ":" & Chr(13) & Chr(10) & Block.Text, , "方块效果指令")
  706. Fi.Text = Block.Text
  707. End Sub
  708. Private Sub Scoreb_DblClick()
  709. Dim a As Integer
  710.  
  711. a = MsgBox(CStr(Val(Scoreb.ListIndex) + 1) & ":" & Chr(13) & Chr(10) & Scoreb.Text, , "计分板创建指令")
  712. Fi.Text = Scoreb.Text
  713. End Sub
  714. Private Sub Dis_DblClick()
  715. Dim a As Integer
  716.  
  717. a = MsgBox(CStr(Val(Dis.ListIndex) + 1) & ":" & Chr(13) & Chr(10) & Dis.Text, , "计分板")
  718. Fi.Text = Dis.Text
  719. End Sub
  720. Private Sub Did_DblClick()
  721. Dim a As Integer
  722.  
  723. a = MsgBox(CStr(Val(Did.ListIndex) + 1) & ":" & Chr(13) & Chr(10) & Did.Text, , "计分板类型")
  724. Fi.Text = Did.Text
  725. End Sub
  726. Private Sub Cmd_DblClick()
  727. Dim a As Integer
  728.  
  729. a = MsgBox(CStr(Val(Cmd.ListIndex) + 1) & ":" & Chr(13) & Chr(10) & Cmd.Text, , "实意指令")
  730. Fi.Text = Cmd.Text
  731. End Sub
  732. Private Sub Label14_Click()
  733. Dim a As String, i As Integer
  734. a = ""
  735.  
  736. If g = 1 Then
  737.     a = a + "文字效果:" & Chr(13) & Chr(10)
  738.     For i = 0 To Tell.ListCount - 1
  739.         If i = Tell.ListCount - 1 Then
  740.             a = a + Tell.List(i)
  741.             Exit For
  742.         End If
  743.         a = a + Tell.List(i) & Chr(13) & Chr(10)
  744.     Next
  745.     a = a & Chr(13) & Chr(10) & "方块效果:" & Chr(13) & Chr(10)
  746.     For i = 0 To Block.ListCount - 1
  747.         If i = Block.ListCount - 1 Then
  748.             a = a + Block.List(i)
  749.             Exit For
  750.         End If
  751.         a = a + Block.List(i) & Chr(13) & Chr(10)
  752.     Next
  753.     a = a & Chr(13) & Chr(10) & "计分板添加:" & Chr(13) & Chr(10)
  754.     For i = 0 To Scoreb.ListCount - 1
  755.         If i = Scoreb.ListCount - 1 Then
  756.             a = a + Scoreb.List(i)
  757.             Exit For
  758.         End If
  759.         a = a + Scoreb.List(i) & Chr(13) & Chr(10)
  760.     Next
  761.     a = a & Chr(13) & Chr(10) & "计分板列表:" & Chr(13) & Chr(10)
  762.     For i = 0 To Dis.ListCount - 1
  763.         If i = Scoreb.ListCount - 1 Then
  764.             a = a + Dis.List(i) & vbTab & Did.List(i)
  765.             Exit For
  766.         End If
  767.         a = a + Dis.List(i) & vbTab & Did.List(i) & Chr(13) & Chr(10)
  768.     Next
  769. End If
  770. If g = 2 Then
  771.     a = a + "文字效果:" & Chr(13) & Chr(10)
  772.     For i = 0 To Tell.ListCount - 1
  773.         If i = Tell.ListCount - 1 Then
  774.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Tell.List(i)
  775.         End If
  776.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Tell.List(i) & Chr(13) & Chr(10)
  777.     Next
  778.     a = a & Chr(13) & Chr(10) & "方块效果:" & Chr(13) & Chr(10)
  779.     For i = 0 To Block.ListCount - 1
  780.         If i = Block.ListCount - 1 Then
  781.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Block.List(i)
  782.         End If
  783.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Block.List(i) & Chr(13) & Chr(10)
  784.     Next
  785.     a = a & Chr(13) & Chr(10) & "计分板添加:" & Chr(13) & Chr(10)
  786.     For i = 0 To Scoreb.ListCount - 1
  787.         If i = Scoreb.ListCount - 1 Then
  788.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Scoreb.List(i)
  789.         End If
  790.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Scoreb.List(i) & Chr(13) & Chr(10)
  791.     Next
  792.     a = a & Chr(13) & Chr(10) & "计分板列表:" & Chr(13) & Chr(10)
  793.     For i = 0 To Dis.ListCount - 1
  794.         If i = Scoreb.ListCount - 1 Then
  795.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Dis.List(i) & vbTab & Did.List(i)
  796.         End If
  797.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Dis.List(i) & vbTab & Did.List(i) & Chr(13) & Chr(10)
  798.     Next
  799. End If
  800.  
  801.  
  802. Clipboard.Clear
  803. Clipboard.SetText a
  804. b = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  805. End Sub
  806.  
  807. Private Sub Label6_Click()
  808. Dim a As String, i As Integer, b As Integer
  809.  
  810. a = ""
  811. a = a + "文字效果:" & Chr(13) & Chr(10)
  812. For i = 0 To Tell.ListCount - 1
  813.     If g = 1 Then
  814.         If i = Tell.ListCount - 1 Then
  815.             a = a + Tell.List(i)
  816.             Exit For
  817.         End If
  818.         a = a + Tell.List(i) & Chr(13) & Chr(10)
  819.     End If
  820.        
  821.     If g = 2 Then
  822.         If i = Tell.ListCount - 1 Then
  823.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Tell.List(i)
  824.             Exit For
  825.         End If
  826.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Tell.List(i) & Chr(13) & Chr(10)
  827.     End If
  828. Next
  829.  
  830. Clipboard.Clear
  831. Clipboard.SetText a
  832. b = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  833. End Sub
  834.  
  835. Private Sub Label7_Click()
  836. Dim a As String, i As Integer, b As Integer
  837.  
  838. a = ""
  839. a = a + "方块效果:" & Chr(13) & Chr(10)
  840. For i = 0 To Block.ListCount - 1
  841.     If g = 1 Then
  842.         If i = Block.ListCount - 1 Then
  843.             a = a + Block.List(i)
  844.             Exit For
  845.         End If
  846.         a = a + Block.List(i) & Chr(13) & Chr(10)
  847.     End If
  848.        
  849.     If g = 2 Then
  850.         If i = Block.ListCount - 1 Then
  851.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Block.List(i)
  852.             Exit For
  853.         End If
  854.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Block.List(i)
  855.     End If
  856. Next
  857.  
  858. Clipboard.Clear
  859. Clipboard.SetText a
  860. b = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  861. End Sub
  862.  
  863. Private Sub Label8_Click()
  864. Dim a As String, i As Integer, b As Integer
  865.  
  866. a = ""
  867. a = a + "计分板添加:" & Chr(13) & Chr(10)
  868. For i = 0 To Scoreb.ListCount - 1
  869.     If g = 1 Then
  870.         If i = Scoreb.ListCount - 1 Then
  871.             a = a + Scoreb.List(i)
  872.             Exit For
  873.         End If
  874.         a = a + Scoreb.List(i) & Chr(13) & Chr(10)
  875.     End If
  876.        
  877.     If g = 2 Then
  878.         If i = Scoreb.ListCount - 1 Then
  879.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Scoreb.List(i)
  880.             Exit For
  881.         End If
  882.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Scoreb.List(i)
  883.     End If
  884. Next
  885.  
  886. Clipboard.Clear
  887. Clipboard.SetText a
  888. b = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  889. End Sub
  890.  
  891. Private Sub Label9_Click()
  892. Dim a As String, i As Integer, b As Integer
  893.  
  894. a = ""
  895.     a = a + "计分板列表:" & Chr(13) & Chr(10)
  896. For i = 0 To Dis.ListCount - 1
  897.     If g = 1 Then
  898.         If i = Scoreb.ListCount - 1 Then
  899.             a = a + Dis.List(i) & vbTab & Did.List(i)
  900.             Exit For
  901.         End If
  902.         a = a + Dis.List(i) & vbTab & Did.List(i) & Chr(13) & Chr(10)
  903.     End If
  904.        
  905.     If g = 2 Then
  906.         If i = Scoreb.ListCount - 1 Then
  907.             a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Dis.List(i) & vbTab & Did.List(i)
  908.             Exit For
  909.         End If
  910.         a = a + CStr(i + 1) & ":" & Chr(13) & Chr(10) & Dis.List(i) & vbTab & Did.List(i) & Chr(13) & Chr(10)
  911.     End If
  912. Next
  913.  
  914. Clipboard.Clear
  915. Clipboard.SetText a
  916. b = MsgBox("复制成功" & Chr(13) & Chr(10) & "请使用粘贴键粘贴", , "复制成功")
  917. End Sub
  918.  
  919. Private Sub Scoreb_Click()
  920. Dim i, a, m As Integer
  921.  
  922. With Command
  923. .SelStart = 1
  924. .SelLength = Len(Command.Text)
  925. .SelBold = False
  926. .SelColor = vbBlack
  927. End With
  928.  
  929. For i = 0 To Scoreb.ListCount - 1
  930.     If Scoreb.Selected(i) = True Then
  931.         a = i
  932.         v = Scoreb.List(a)
  933.         m = 0
  934.         For b = 0 To Len(Command.Text) - Len(Replace(Command.Text, Scoreb.List(a), ""))
  935.             m = InStr(m + Len(Scoreb.List(a)), Command.Text, Scoreb.List(a))
  936.             If m = 0 Then
  937.                 Exit For
  938.             End If
  939.             With Command
  940.             .SelStart = m - 1
  941.             .SelLength = Len(Scoreb.List(a))
  942.             .SelBold = True
  943.             .SelColor = vbRed
  944.             End With
  945.         Next
  946.     End If
  947. Next
  948.  
  949. JX.ListIndex = -1
  950. Tell.ListIndex = -1
  951. Block.ListIndex = -1
  952. Dis.ListIndex = -1
  953. Did.ListIndex = -1
  954. Cmd.ListIndex = -1
  955. End Sub
  956.  
  957. Private Sub Tell_Click()
  958. Dim i, a, m As Integer
  959.  
  960. With Command
  961. .SelStart = 1
  962. .SelLength = Len(Command.Text)
  963. .SelBold = False
  964. .SelColor = vbBlack
  965. End With
  966.  
  967. For i = 0 To Tell.ListCount - 1
  968.     If Tell.Selected(i) = True Then
  969.         a = i
  970.         v = Tell.List(a)
  971.         m = 0
  972.         For b = 0 To Len(Command.Text) - Len(Replace(Command.Text, Tell.List(a), ""))
  973.             m = InStr(m + Len(Tell.List(a)), Command.Text, Tell.List(a))
  974.             If m = 0 Then
  975.                 Exit For
  976.             End If
  977.             With Command
  978.             .SelStart = m - 1
  979.             .SelLength = Len(Tell.List(a))
  980.             .SelBold = True
  981.             .SelColor = vbRed
  982.             End With
  983.         Next
  984.     End If
  985. Next
  986.  
  987. JX.ListIndex = -1
  988. Scoreb.ListIndex = -1
  989. Block.ListIndex = -1
  990. Dis.ListIndex = -1
  991. Did.ListIndex = -1
  992. Cmd.ListIndex = -1
  993. End Sub
  994.  
  995. Private Sub 清空OneCommand_Click()
  996. Dim a As Integer
  997. Command.Text = ""
  998. a = MsgBox("已经清空", , "清空")
  999. End Sub
Advertisement
Add Comment
Please, Sign In to add comment