楼 主
[已结]如何利用sendkeys发送ALT+F4组合键
发表于 2008-03-25 19:02 · 中国 黑龙江 大庆 联通
高级用户
★★
积分 547
发帖 261
注册 2006-04-15 16:50
20年会员
UID 53887
状态 离线
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 ]
第 2 楼
发表于 2008-03-25 19:10 · 中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
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
第 3 楼
发表于 2008-03-26 11:35 · 中国 黑龙江 大庆 大庆中基石油通信建设有限公司
高级用户
★★
积分 547
发帖 261
注册 2006-04-15 16:50
20年会员
UID 53887
状态 离线
第 4 楼
发表于 2008-10-19 22:38 · 中国 河北 廊坊 联通
初级用户
★
积分 23
发帖 10
注册 2008-03-13 18:30
18年会员
UID 112874
性别 男
状态 离线
这个批命令怎么用啊?
我直接保存为a.bat为什么不行啊?
第 5 楼
Re 4楼
发表于 2008-10-19 23:44 · 美国 惠普HP
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
论坛跳转: