Windows每五秒点击一次键盘保持不锁屏

模拟键盘每五秒点击一次大写锁定键,保持Windows不锁屏 (一共执行1000次)

使用步骤:

1,桌面新建文本文档

2,将代码复制到文档中

3,文本文档后缀改成.vbs

4,双击运行

Set wshShell = WScript.CreateObject("WScript.Shell")
for i = 0 to 1000
wshShell.SendKeys "{CAPSLOCK}"
Wscript.sleep 5000
next

5,提前结束:打开任务管理器,在详细信息中找到wscript.exe结束任务

 提示:

1,代码中1000代表执行1000次,5000代表5秒,可按需要改变

2,代码中CAPSLOCK代表大写锁定键,也可自定义其他单独按键或者组合按键:

←:		wshShell.SendKeys “{LEFT}”
↑:		wshShell.SendKeys “{UP}”
→:		wshShell.SendKeys “{RIGHT}”
↓:		wshShell.SendKeys “{DOWN}”
Space:		wshShell.SendKeys " "
Enter:		wshShell.SendKeys “{ENTER}”
BREAK:		wshShell.SendKeys “{BREAK}”
ESC:		wshShell.SendKeys “{ESC}”
DEL:		wshShell.SendKeys “{DEL}”
END:		wshShell.SendKeys “{END}”
HOME:		wshShell.SendKeys “{HOME}”
Insert:	wshShell.SendKeys “{INS}”
BREAK:		wshShell.SendKeys “{BREAK}”
NUM LOCK :	wshShell.SendKeys “{NUMLOCK}”
PAGE UP :	wshShell.SendKeys “{PGUP}”
PAGE DOWN :	wshShell.SendKeys “{PGDN}”
PRINT SCREEN :	wshShell.SendKeys “{PRTSC}”
SCROLL LOCK :	wshShell.SendKeys “{SCROLLLOCK}”
TAB:		wshShell.SendKeys “{TAB}”
F1:		wshShell.SendKeys “{F1}”
Fn同F1

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值