创建.vbs文件,代码内容如下。双击执行即可,电脑关机自动停止。
Dim WshShell,Path,i
MsgBox "start..."
set WSHshell = WScript.CreateObject("WScript.shell")
Do While True
Wscript.Sleep 4000
'WshShell.SendKeys "{F5}"
WshShell.SendKeys "{SCROLLLOCK}"
Loop
临时停止,代码如下。双击停止运行脚本。
dim WSHshell
MsgBox "end..."
set WSHshell = WScript.CreateObject("WScript.shell")
WSHshell.run "taskkill /im WScript.exe /f", 0, true