圆月山庄资源网 Design By www.vgjia.com
ps:不知道有人还记得这个攻击qq群的代码?就是利用这个所写的!
SendKeys
模拟键盘操作,将一个或多个按键指令发送到指定Windows窗口来控制应用程序运行,
其使用格式为:object.SendKeys string
“object”:表示WshShell对象
“string”:表示要发送的按键指令字符串,需要放在英文双引号中。
1.基本键
一般来说,要发送的按键指令都可以直接用该按键字符本身来表示,例如要发送字母“x”,使用“WshShell.SendKeys "x"”即可。当然,也可直接发送多个按键指令,只需要将按键字符按顺序排列在一起即可,例如,要发送按键“happy”,可以使用“WshShell.SendKeys "happy"”。
2.特殊功能键
对于需要与Shift、Ctrl、Alt三个控制键组合的按键,SendKeys使用特殊字符来表示:
Shift---------WshShell.SendKeys "+"
Ctrl---------WshShell.SendKeys "^"
Alt---------WshShell.SendKeys "%"
由于“+”、“^”这些字符用来表示特殊的控制按键了,如何表示这些按键呢?
只要用大括号括住这些字符即可。例如:
要发送加号“+”,可使用“WshShell.SendKeys "{+}"”
另外对于一些不会生成字符的控制功能按键,也同样需要使用大括号括起来按键的名称,例如要发送回车键,需要用“WshShell.SendKeys "{ENTER}"”表示,发送向下的方向键用“WshShell.SendKeys "{DOWN}"”表示。
Space---------WshShell.SendKeys " "
Enter---------WshShell.SendKeys "{ENTER}"
←---------WshShell.SendKeys "{RIGHT}"
↑---------WshShell.SendKeys "{UP}"
F1---------WshShell.SendKeys "{F1}"
Tips:如果需要发送多个重复的单字母按键,不必重复输入该字母,SendKeys允许使用简化格式进行描述,使用格式为“{按键 数字}”。例如要发送10个字母“x”,则输入“WshShell.SendKeys "{x 10}"”即可。
实例:
----------------------------------------------------
按下F5刷新桌面
Dim WshShell,Path,i
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "{F5}"
----------------------------------------------------
电脑的自动重启
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^{ESC}u"
WshShell.SendKeys "R"
----------------------------------------------------
启动任务管理器
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^+{ESC}"
----------------------------------------------------
QQ消息群发
Dim WshShell
Set WshShell= WScript.createObject("WScript.Shell")
WshShell.AppActivate "bomb"
for i=1 to 60
WScript.Sleep 800
WshShell.SendKeys "Number0"
WshShell.SendKeys i
WshShell.SendKeys "%s"
next
----------------------------------------------------
自动到百度搜索歌曲:white flag
Dim WshShell,Path,i
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("IEXPLORE.EXE")
WScript.Sleep 2000
WshShell.AppActivate "about:blank-Microsoft Internet Explorer"
WshShell.SendKeys "+{TAB}"
WshShell.SendKeys "http://mp3.baidu.com"
WScript.Sleep 800
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys "white flag"
WScript.Sleep 800
WshShell.SendKeys "{ENTER}"
----------------------------------------------------
在记事本中输入Happy Birthday!并保存为birth.txt
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run "notepad"
WScript.Sleep 1500
WshShell.AppActivate "无标题 - 记事本"
WshShell.SendKeys "H"
WScript.Sleep 500
WshShell.SendKeys "a"
WScript.Sleep 500
WshShell.SendKeys "p"
WScript.Sleep 500
WshShell.SendKeys "p"
WScript.Sleep 500
WshShell.SendKeys "y"
WScript.Sleep 500
WshShell.SendKeys " "
WScript.Sleep 500
WshShell.SendKeys "B"
WScript.Sleep 500
WshShell.SendKeys "i"
WScript.Sleep 500
WshShell.SendKeys "r"
WScript.Sleep 500
WshShell.SendKeys "t"
WScript.Sleep 500
WshShell.SendKeys "h"
WScript.Sleep 500
WshShell.SendKeys "d"
WScript.Sleep 500
WshShell.SendKeys "a"
WScript.Sleep 500
WshShell.SendKeys "y"
WScript.Sleep 500
WshShell.SendKeys "!"
WScript.Sleep 500
WshShell.SendKeys "%FS"
WScript.Sleep 500
WshShell.SendKeys "b"
WScript.Sleep 500
WshShell.SendKeys "i"
WScript.Sleep 500
WshShell.SendKeys "r"
WScript.Sleep 500
WshShell.SendKeys "t"
WScript.Sleep 500
WshShell.SendKeys "h"
WScript.Sleep 500
WshShell.SendKeys "%S"
WScript.Sleep 500
WshShell.SendKeys "%FX"
----------------------------------------------------
制作能自动定时存盘的记事本
'第一部分:定义变量和对象
Dim WshShell, AutoSaveTime, TXTFileName
AutoSaveTime=300000
Set WshShell=WScript.CreateObject("WScript.Shell")
TXTFileName=InputBox("请输入你要创建的文件名(不能用中文和纯数字):")
'第二部分:打开并激活记事本
WshShell.Run "notepad"
WScript.Sleep 200
WshShell.AppActivate "无标题 - 记事本"
'第三部分:用输入的文件名存盘
WshShell.SendKeys "^s"
WScript.Sleep 300
WshShell.SendKeys TXTFileName
WScript.Sleep 300
WshShell.SendKeys "%s"
WScript.Sleep AutoSaveTime
'第四部分:自动定时存盘
While WshShell.AppActivate (TXTFileName)=True
WshShell.SendKeys "^s"
WScript.Sleep AutoSaveTime
Wend
WScript.Quit
----------------------------------------------------
死机的,嘿嘿!
DIM WSHSHELL
SET WSHSHELL=WSCRIPT.CREATEOBJECT("WSCRIPT.SHELL")
'WSHSHELL.RUN " "
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
----------------------------------------------------
定时关机的
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
WScript.Sleep 2000
WshShell.Run "shutdown -r -t 120"
wscript.sleep 6000
WshShell.Run "shutdown -a
SendKeys
模拟键盘操作,将一个或多个按键指令发送到指定Windows窗口来控制应用程序运行,
其使用格式为:object.SendKeys string
“object”:表示WshShell对象
“string”:表示要发送的按键指令字符串,需要放在英文双引号中。
1.基本键
一般来说,要发送的按键指令都可以直接用该按键字符本身来表示,例如要发送字母“x”,使用“WshShell.SendKeys "x"”即可。当然,也可直接发送多个按键指令,只需要将按键字符按顺序排列在一起即可,例如,要发送按键“happy”,可以使用“WshShell.SendKeys "happy"”。
2.特殊功能键
对于需要与Shift、Ctrl、Alt三个控制键组合的按键,SendKeys使用特殊字符来表示:
Shift---------WshShell.SendKeys "+"
Ctrl---------WshShell.SendKeys "^"
Alt---------WshShell.SendKeys "%"
由于“+”、“^”这些字符用来表示特殊的控制按键了,如何表示这些按键呢?
只要用大括号括住这些字符即可。例如:
要发送加号“+”,可使用“WshShell.SendKeys "{+}"”
另外对于一些不会生成字符的控制功能按键,也同样需要使用大括号括起来按键的名称,例如要发送回车键,需要用“WshShell.SendKeys "{ENTER}"”表示,发送向下的方向键用“WshShell.SendKeys "{DOWN}"”表示。
Space---------WshShell.SendKeys " "
Enter---------WshShell.SendKeys "{ENTER}"
←---------WshShell.SendKeys "{RIGHT}"
↑---------WshShell.SendKeys "{UP}"
F1---------WshShell.SendKeys "{F1}"
Tips:如果需要发送多个重复的单字母按键,不必重复输入该字母,SendKeys允许使用简化格式进行描述,使用格式为“{按键 数字}”。例如要发送10个字母“x”,则输入“WshShell.SendKeys "{x 10}"”即可。
实例:
----------------------------------------------------
按下F5刷新桌面
Dim WshShell,Path,i
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "{F5}"
----------------------------------------------------
电脑的自动重启
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^{ESC}u"
WshShell.SendKeys "R"
----------------------------------------------------
启动任务管理器
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^+{ESC}"
----------------------------------------------------
QQ消息群发
Dim WshShell
Set WshShell= WScript.createObject("WScript.Shell")
WshShell.AppActivate "bomb"
for i=1 to 60
WScript.Sleep 800
WshShell.SendKeys "Number0"
WshShell.SendKeys i
WshShell.SendKeys "%s"
next
----------------------------------------------------
自动到百度搜索歌曲:white flag
Dim WshShell,Path,i
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("IEXPLORE.EXE")
WScript.Sleep 2000
WshShell.AppActivate "about:blank-Microsoft Internet Explorer"
WshShell.SendKeys "+{TAB}"
WshShell.SendKeys "http://mp3.baidu.com"
WScript.Sleep 800
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys "white flag"
WScript.Sleep 800
WshShell.SendKeys "{ENTER}"
----------------------------------------------------
在记事本中输入Happy Birthday!并保存为birth.txt
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run "notepad"
WScript.Sleep 1500
WshShell.AppActivate "无标题 - 记事本"
WshShell.SendKeys "H"
WScript.Sleep 500
WshShell.SendKeys "a"
WScript.Sleep 500
WshShell.SendKeys "p"
WScript.Sleep 500
WshShell.SendKeys "p"
WScript.Sleep 500
WshShell.SendKeys "y"
WScript.Sleep 500
WshShell.SendKeys " "
WScript.Sleep 500
WshShell.SendKeys "B"
WScript.Sleep 500
WshShell.SendKeys "i"
WScript.Sleep 500
WshShell.SendKeys "r"
WScript.Sleep 500
WshShell.SendKeys "t"
WScript.Sleep 500
WshShell.SendKeys "h"
WScript.Sleep 500
WshShell.SendKeys "d"
WScript.Sleep 500
WshShell.SendKeys "a"
WScript.Sleep 500
WshShell.SendKeys "y"
WScript.Sleep 500
WshShell.SendKeys "!"
WScript.Sleep 500
WshShell.SendKeys "%FS"
WScript.Sleep 500
WshShell.SendKeys "b"
WScript.Sleep 500
WshShell.SendKeys "i"
WScript.Sleep 500
WshShell.SendKeys "r"
WScript.Sleep 500
WshShell.SendKeys "t"
WScript.Sleep 500
WshShell.SendKeys "h"
WScript.Sleep 500
WshShell.SendKeys "%S"
WScript.Sleep 500
WshShell.SendKeys "%FX"
----------------------------------------------------
制作能自动定时存盘的记事本
'第一部分:定义变量和对象
Dim WshShell, AutoSaveTime, TXTFileName
AutoSaveTime=300000
Set WshShell=WScript.CreateObject("WScript.Shell")
TXTFileName=InputBox("请输入你要创建的文件名(不能用中文和纯数字):")
'第二部分:打开并激活记事本
WshShell.Run "notepad"
WScript.Sleep 200
WshShell.AppActivate "无标题 - 记事本"
'第三部分:用输入的文件名存盘
WshShell.SendKeys "^s"
WScript.Sleep 300
WshShell.SendKeys TXTFileName
WScript.Sleep 300
WshShell.SendKeys "%s"
WScript.Sleep AutoSaveTime
'第四部分:自动定时存盘
While WshShell.AppActivate (TXTFileName)=True
WshShell.SendKeys "^s"
WScript.Sleep AutoSaveTime
Wend
WScript.Quit
----------------------------------------------------
死机的,嘿嘿!
DIM WSHSHELL
SET WSHSHELL=WSCRIPT.CREATEOBJECT("WSCRIPT.SHELL")
'WSHSHELL.RUN " "
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
'WSCRIPT.SLEEP 1000
WSHSHELL.SENDKEYS "{ENTER}"
----------------------------------------------------
定时关机的
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
WScript.Sleep 2000
WshShell.Run "shutdown -r -t 120"
wscript.sleep 6000
WshShell.Run "shutdown -a
圆月山庄资源网 Design By www.vgjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
圆月山庄资源网 Design By www.vgjia.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年11月02日
2024年11月02日
- 《暗喻幻想》顺风耳作用介绍
- 崔健1985-梦中的倾诉[再版][WAV+CUE]
- 黄子馨《追星Xin的恋人们2》HQ头版限量编号[WAV+CUE]
- 孟庭苇《情人的眼泪》开盘母带[低速原抓WAV+CUE]
- 孙露《谁为我停留HQCD》[低速原抓WAV+CUE][1.1G]
- 孙悦《时光音乐会》纯银CD[低速原抓WAV+CUE][1.1G]
- 任然《渐晚》[FLAC/分轨][72.32MB]
- 英雄联盟新英雄安蓓萨上线了吗 新英雄安蓓萨技能介绍
- 魔兽世界奥杜尔竞速赛什么时候开启 奥杜尔竞速赛开启时间介绍
- 无畏契约CGRS准星代码多少 CGRS准星代码分享一览
- 张靓颖.2012-倾听【少城时代】【WAV+CUE】
- 游鸿明.1999-五月的雪【大宇国际】【WAV+CUE】
- 曹方.2005-遇见我【钛友文化】【WAV+CUE】
- Unity6引擎上线:稳定性提升、CPU性能最高提升4倍
- 人皇Sky今日举行婚礼!电竞传奇步入新篇章