- 超级版主
- 1228894
- 26974
- 25
- 8049 朵
- 36128 个
- 4745 个
- 421340
- 2012-07-18
|
1#
t
T
发表于 2022-02-12 22:53
|
|只看楼主
原插件/命令库Html帮助生成助手开源旧贴: 小工具分享----插件/命令库Html帮助生成助手----[第六章]开源原因: 1. 不用怀疑,我就是想 2. 更新or维护?更新这辈子是不可能更新了,开源出来等待有兴致的小伙伴偷电动车继续更新下去 效果一览: 代码一览:- Event Form1.Button1.Click
- Call Plugin.File.WriteINI(Form1.InputBox1.text , "命令名称", Form1.InputBox1.text, "C:\Config.ini")
- Call Plugin.File.WriteINI(Form1.InputBox1.text , "命令功能", Form1.InputBox2.text, "C:\Config.ini")
- Call Plugin.File.WriteINI(Form1.InputBox1.text , "参数",Replace( Form1.InputBox3.text,vbcrlf,"|") , "C:\Config.ini")
- Call Plugin.File.WriteINI(Form1.InputBox1.text , "返回值", Form1.InputBox4.text, "C:\Config.ini")
- Call Plugin.File.WriteINI(Form1.InputBox1.text, "脚本例子", Replace(Form1.InputBox5.text, vbcrlf, "|"), "C:\Config.ini")
- BeginThread 读取所有命令名称
- End Event
- Event Form1.LoadOver
- BeginThread 读取所有命令名称
- End Event
- Sub 读取所有命令名称()
- Text = Plugin.File.ReadFileEx("C:\Config.ini")
- Form1.ListBox1.List=GetStrAB(Text, "[", "]")
- End Sub
- Function GetStrAB(Str, StrA, StrB)
- Dim i,ArrStrA,Ck
- ArrStrA=Split(Str,StrA)
- For i = 1 To UBound(ArrStrA)
- If InStr(ArrStrA(i), StrB) > 0 Then Ck = Ck & Split(ArrStrA(i),StrB)(0) &"|"
- Next
- GetStrAB=Ck
- End Function
- Event Form1.ListBox1.DblClick
- 选中值 = Split(Form1.ListBox1.List, "|")(Form1.ListBox1.ListIndex)
- TracePrint 选中值
- Form1.InputBox1.text = Plugin.File.ReadINI(选中值,"命令名称", "C:\Config.ini")
- Form1.InputBox2.text = Plugin.File.ReadINI(选中值, "命令功能", "C:\Config.ini")
- Form1.InputBox3.text = Replace( Plugin.File.ReadINI(选中值, "参数", "C:\Config.ini"),"|",vbcrlf)
- Form1.InputBox4.text = Plugin.File.ReadINI(选中值, "返回值", "C:\Config.ini")
- Form1.InputBox5.text = Replace( Plugin.File.ReadINI(选中值,"脚本例子", "C:\Config.ini"),"|",vbcrlf)
- End Event
- Event Form1.Button2.Click
- BeginThread 制作Html
- End Event
- Sub 制作Html()
- Input = InputBox("输入将制作Html文档名称[不用带.Html]")
- Call Plugin.File.DeleteFile("C:\" & Input & ".html")
- Call Plugin.File.DeleteFile("C:\one.txt")
- Call Plugin.File.DeleteFile("C:\two.txt")
- Do
- PutAttachment "C:\", "*.*"
- If Plugin.File.IsFileExist("C:\two.txt") = True and Plugin.File.IsFileExist("C:\one.txt") = True Then
- Exit Do
- End If
- Delay 500
- Loop
- 分割 = Split(Form1.ListBox1.List, "|")
- For i = 0 To UBound(分割) - 1
- TracePrint 分割(i)
- Form1.InputBox1.text = Plugin.File.ReadINI(分割(i),"命令名称", "C:\Config.ini")
- Form1.InputBox2.text = Plugin.File.ReadINI(分割(i), "命令功能", "C:\Config.ini")
- Form1.InputBox3.text = Replace( Plugin.File.ReadINI(分割(i), "参数", "C:\Config.ini"),"|",vbcrlf)
- Form1.InputBox4.text = Plugin.File.ReadINI(分割(i), "返回值", "C:\Config.ini")
- Form1.InputBox5.text = Replace(Plugin.File.ReadINI(分割(i), "脚本例子", "C:\Config.ini"), "|", vbcrlf)
- Text = Plugin.File.ReadFileEx("C:\two.txt")
- Text = Replace(Text, "Var1", Form1.InputBox1.text)
- Text = Replace(Text, "Var2", Form1.InputBox2.text)
- Text = Replace(Text, "Var3", Replace( Form1.InputBox3.text,"|",vbcrlf))
- Text = Replace(Text, "Var4", Form1.InputBox4.text)
- Text = Replace(Text,"Var5", Replace(Form1.InputBox5.text, "|", vbcrlf))
- TracePrint text
- Call Plugin.File.WriteFileEx("C:\one.txt","</td></tr></table>"&Replace(Text,"|",vbcrlf))
- Delay 50
- Next
- Call Plugin.File.ReNameFile("C:\one.txt", "C:\" & Input & ".html")
- Call Plugin.File.DeleteFile("C:\two.txt")
- Call Plugin.File.DeleteFile("C:\one.txt")
- MessageBox "生成完毕,文件位于C盘"
- End Sub
- Event Form1.UnLoad
- Call Plugin.File.DeleteFile("C:\two.txt")
- End Event
- Event Form1.Button3.Click
- Call Plugin.File.DeleteFile("C:\Config.ini")
- BeginThread 读取所有命令名称
- End Event
- Event Form1.Button4.Click
- call Plugin.Sys.SetCLB(Form1.InputBox5.text)
- MessageBox "命令复制完成"
- End Event
复制代码 源码下载: - html.zip (, 下载次数:284)
|