用vbs实现的输入助手附使用方法
程序员文章站
2022-07-04 20:40:04
//把要echo的脚本,拖到此脚本上...根据提示操作即可 复制代码 代码如下:on error resume next ...
//把要echo的脚本,拖到此脚本上...根据提示操作即可
复制代码 代码如下:
on error resume next
set arg=wscript.arguments
if arg.count=0 then wscript.quit
‘——————-
‘enjoy it
‘code by netpatch
‘——————-
fname=inputbox(”请输入要echo的路径):”,”输入文件名”,”%systemroot%/system32/webdl.vbs”)
set fso=createobject(”scripting.filesystemobject”)
set wshshell=wscript.createobject(”wscript.shell”)
set file=fso.opentextfile(arg(0),1,false,-2)
wscript.echo “点确定后5秒开始”
wshshell.appactivate “命令提示符”
wscript.sleep 5000
wshshell.appactivate “命令提示符”
do while file.atendofstream <> true
data=file.readline
if data=”" then data=”.”
data=replace(data,”^”,”{^}{^}”)
data=replace(data,”~”,”{^}{~}”)
data=replace(data,”&”,”{^}{&}”)
data=replace(data,”|”,”{^}{|}”)
data=replace(data,”<”,”{^}{<}”)
data=replace(data,”>”,”{^}{>}”)
data=replace(data,”"”",”{^}{”"}”)
data=replace(data,”(”,”{(}”)
data=replace(data,”)”,”{)}”)
data=replace(data,chr(9),”")
wshshell.sendkeys “echo “&data&”>>”&fname
wscript.sleep 300
wshshell.sendkeys “{enter}”
wscript.sleep 1000
loop
file.close
set fso=nothing