以下存为BAT文件。双击安装一次脚本,以后可以通过快捷键调用f10开始、f11停止
@echo off
title 每隔1秒同时按下回车
mode con: cols=50 lines=5
color 1a
echo set WshShell = WScript.CreateObject("WScript.Shell")>%systemroot%\hotkey.vbs
echo Do While 1 >>%systemroot%\hotkey.vbs
echo WshShell.SendKeys "{enter}" >>%systemroot%\hotkey.vbs
echo WScript.Sleep 900 >>%systemroot%\hotkey.vbs
echo Loop>>%systemroot%\hotkey.vbs
echo set y=getobject("winmgmts:\\.\root\cimv2")>%systemroot%\pause.vbs
echo set x=y.execquery("select * from win32_process where name='wscript.exe'")>>%systemroot%\pause.vbs
echo for each i in x >>%systemroot%\pause.vbs
echo i.terminate()>>%systemroot%\pause.vbs
echo next>>%systemroot%\pause.vbs
@echo 按键脚本正在安装.......
<