This is the most wonderful day of my life
because I'm here with you now
输入短句后自动关闭记事本,并保存文件名为“test”,关闭记事本可以直接使用组合按键Alt+F4来实现作者: lxmxn 时间: 2007-6-25 00:26 是让它模拟“正在打字输入”的效果么?作者: terse 时间: 2007-6-25 00:29 搜索一下啊
dim ws
set ws=wscript.createobject("wscript.shell")
str = "This is the most wonderful day of my life$because I'm here with you now"
Num = len(str)
ws.run("notepad.exe")
wscript.sleep 100
for i = 1 to Num
Input = Mid(str, i, 1)
if Input = "$" then Input = vbCr
wscript.sleep 100
ws.sendkeys(Input)
next
WS.SendKeys "^s"
WScript.Sleep 100
WS.SendKeys "test"
WScript.Sleep 100
WS.SendKeys "{ENTER}"
WS.SendKeys "%{f4}"
这个没打字效果
dim ws
set ws=wscript.createobject("wscript.shell")
ws.run("notepad.exe")
wscript.sleep 100
ws.sendkeys "because I'm here with you now"
wscript.sleep 100
WS.SendKeys "{ENTER}"
ws.sendkeys "This is the most wonderful day of my life"
WS.SendKeys "^s"
WScript.Sleep 100
WS.SendKeys "test"
WScript.Sleep 100
WS.SendKeys "{ENTER}"
WS.SendKeys "%{f4}"
[ Last edited by terse on 2007-6-25 at 12:37 AM ]作者: bd123456789 时间: 2007-6-25 22:32
Quote:
Originally posted by terse at 2007-6-25 12:29 AM:
搜索一下啊
dim ws
set ws=wscript.createobject("wscript.shell")
str = "This is the most wonderful day of my life$because I'm here with you now"
Num = len(str)
ws.run(& ...
精彩!作者: bd123456789 时间: 2007-6-25 22:32
Quote:
Originally posted by terse at 2007-6-25 12:29 AM:
搜索一下啊
dim ws
set ws=wscript.createobject("wscript.shell")
str = "This is the most wonderful day of my life$because I'm here with you now"
Num = len(str)
ws.run(& ...