Loading...
@echo off :start start notepad.exe //启动记事本 set WshShell = WScript.CreateObject("WScript.Shell") //创建Shell对象 WshShell.SendKeys "{ENTER}" //在记事本中输入一个换行符,以确保接下来的内容在新行中输入 WScript.Sleep 1000 //等待1秒 WshShell.SendKeys "%{F4}" //按Alt+F4,关闭记事本 timeout /t 60 //等待60秒 goto start //返回开始
1 条评论
@echo off
:start
start notepad.exe //启动记事本
set WshShell = WScript.CreateObject("WScript.Shell") //创建Shell对象
WshShell.SendKeys "{ENTER}" //在记事本中输入一个换行符,以确保接下来的内容在新行中输入
WScript.Sleep 1000 //等待1秒
WshShell.SendKeys "%{F4}" //按Alt+F4,关闭记事本
timeout /t 60 //等待60秒
goto start //返回开始