当程序把输出输入到管道里 就不会再管什么退格键了1.vbs
- set w=createobject("wscript.shell")
- set t=w.exec("cscript /nologo 2.vbs")
- set f=createobject("scripting.filesystemobject")
- set ff=f.opentextfile("1.txt",2,true)
- wscript.sleep 100
- do
- ff.write t.stdout.read(1)
- loop
复制代码
2.vbs
- wscript.stdout.write string(70,"*")&"="
- for i=0 to 69
- wscript.stdout.write chr(8)
- wscript.stdout.write chr(8)
- wscript.stdout.write "-"
- next
- wscript.stdin.readline
复制代码
得到的输出是
**********************************************************************=---------------------------------------------------------------------- |