这是程序是通过读取一个文本文件(中文),然后将每个字读取到数组,由数组传给SendKesys,然后输出!
-----------------------------------------------------------------------------------------------------------------
显示的时候,有时候会出现一个汉字重复发送,或者少发送,并且显示的有“ECHO 处于打开状态”,这些
没有用的字符!
麻烦大家给看看!
----------------------------------------------------------------------------------------------------------------- | dim b(100) | | set fso=CreateObject("scripting.filesystemobject") | | set wshobj=Wscript.CreateObject("wscript.shell") | | set ffile=fso.Opentextfile("C:\Documents and Settings\hyf_soft\桌面\ceshiddd11.txt",1,flase) | | wshobj.run"notepad" | | a1=ffile.readline | | a2=len(a1) | | for j=1 to a2 | | a3=mid(a1,j,1) | | b(j-1)=a3 | | j=j+1 | | next | | wshobj.sleep 500 | | | | for i=0 to a2-1 | | a4=b(i) | | wshobj.Run "cmd.exe /c echo " & a4 & "| clip.exe", vbHide | | wshobj.SendKeys "^v" | | wshobj.SendKeys"{BACKSPACE}" | | next | | ffile.closeCOPY |
----------------------------------------------------------------------------------------- |