一个VBS:
- Dim fso,wsh,ie,txt
- Set fso=CreateObject("Scripting.Filesystemobject")
- Set wsh=CreateObject("Wscript.Shell")
- Set ie=CreateObject("Internetexplorer.Application")
- ie.visible=False
- ie.navigate "about:blank"
- '获取剪贴板内容
- str=ie.document.parentwindow.clipboarddata.getdata("text")
- '创建文本并写入内容
- Set txt=fso.CreateTextFile(wsh.CurrentDirectory&"\说明.txt",false)
- txt.WriteLine(str)
- txt.Close
- Wscript.Sleep 300
- set txt=fso.getfile(wsh.CurrentDirectory&"\说明.txt")
- '重命名,处于编辑状态
- txt.Name=inputbox("此次输入你的文件名:","文件名","说明")&".txt"
- Set fso=Nothing:Set wsh=Nothing:Set ie=Nothing:Set txt=nothing
复制代码
|