标题: [已结]如何利用sendkeys发送ALT+F4组合键
[打印本页]
作者: tempuser
时间: 2008-3-25 19:02
标题: [已结]如何利用sendkeys发送ALT+F4组合键
dim wshell
set wshell=wscript.createobject("wscript.shell")
wshell.run "notepad"
wshell.sendkeys "hello"
wshell.sendkeys "^s"
wshell.sendkeys "%+F4"
我想发送alt+F4键,关掉记事本,可是无法sendkeys alt+F4组合键啊?
我该怎么做?
谢谢!
[
Last edited by HAT on 2008-10-19 at 23:44 ]
作者: slore
时间: 2008-3-25 19:10
Dim wshell
Set wshell
= wscript.
CreateObject("
WScript.Shell"
)
wshell.run "
notepad"
wscript.sleep 1000
wshell.sendkeys "
hello"
wshell.sendkeys "
^s"
wshell.sendkeys "
noname"
wshell.sendkeys "
{Enter}"
wscript.sleep 1000
wshell.sendkeys "
%{F4}"
Set wshell
= Nothing
作者: tempuser
时间: 2008-3-26 11:35
测试通过,谢谢!
作者: jolog
时间: 2008-10-19 22:38
这个批命令怎么用啊?
我直接保存为a.bat为什么不行啊?
作者: HAT
时间: 2008-10-19 23:44
标题: Re 4楼
把2楼的代码保存为test.vbs