- '本vbs是读取的当前目录下的a.txt的内容,请自行修改path值
- dim strcopy,path
- set wshshell=createobject("wscript.shell")
- path=wshshell.currentdirectory
- set objfso=createobject("scripting.filesystemobject")
- set objtxt=objfso.opentextfile(path&"\a.txt",1)
- strcopy=objtxt.readall
- set objie=createobject("internetexplorer.application")
- objie.navigate("about:blank")
- objie.document.parentwindow.clipboarddata.setdata "text", strcopy
- objie.quit
- set objie=nothing
- set objtxt=nothing
- set objfso=nothing
- set wshshell=nothing
复制代码
|