我在咱论坛找到一段挺有意思的vbs:
如下:
dim ws
str = "user: ok welcome!!!"
Num = len(str)
set ws=wscript.createobject("wscript.shell")
ws.run("notepad.exe")
wscript.sleep 200
ws.appactivate "无标题 - 记事本"
wscript.sleep 500
for i = 1 to Num
Input = Mid(str, i, 1)
if Input = "$" then Input = vbCr
wscript.sleep 500
ws.sendkeys(Input)
next
结果是,打开的记事本,效果也挺好,能不能再接着把这个记事自动关闭呀。不用保存。。。。
[ Last edited by zhanghong1 on 2007-7-12 at 05:14 PM ]
如下:
dim ws
str = "user: ok welcome!!!"
Num = len(str)
set ws=wscript.createobject("wscript.shell")
ws.run("notepad.exe")
wscript.sleep 200
ws.appactivate "无标题 - 记事本"
wscript.sleep 500
for i = 1 to Num
Input = Mid(str, i, 1)
if Input = "$" then Input = vbCr
wscript.sleep 500
ws.sendkeys(Input)
next
结果是,打开的记事本,效果也挺好,能不能再接着把这个记事自动关闭呀。不用保存。。。。
[ Last edited by zhanghong1 on 2007-7-12 at 05:14 PM ]
