改编版电脑自动定时关机脚本源码
运行环境:分辨率:1440×900 色深:32位 操作系统:Microsoft Windows XP 按键精灵版本:9.33.11393
Event Form1.over.click Hwnd = Plugin.Window.Find(0, "改编版电脑自动关机程序3代") HwndEx = Plugin.Window.FindEx(Hwnd, 0, "Dialog", 0) Call Plugin.Window.CloseEx(Hwnd) End Event Event Form1.Start. Click Delay 100 dim Obj,UserName,NowTime,LenS,Num set Obj = createobject("WScript.Shell") UserName=Obj.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOwner") YN=Obj.Popup(UserName&" 你好,是否使用自动定时关机?",0,"关机?",36) If YN=6 Then Rem InputTime SWTime=InputBox ("请输入关机时间!24小时格式(00:00~23:59之间)!如:2:03 , 22:35") LenS=Len(SWTime) Num=Instr(SWTime,":") If Num=0 Then Num=Instr(SWTime,":") End If If Num=0 Then Call Obj.Popup("间隔符错误!请用“ : ”或者“ : ”",5,"时间格式错误!",48) Goto InputTime End If If left(SWTime,Num-1)>23 or left(SWTime,Num-1)<0 Then Call Obj.Popup("小时格式输入错误!",5,"时间格式错误!",48) Goto InputTime End If If Right(SWTime,LenS-Num)>59 or Right(SWTime,LenS-Num)<0 Then Call Obj.Popup("分钟格式输入错误!",5,"时间格式错误!",48) Goto InputTime End If Call Obj.Popup("系统将在"&SWTime&"关机!!",5,"自动关机!",48) Rem Start NowTime=Time If Hour(SWTime)=Hour(NowTime) and Minute(SWTime)=Minute(NowTime) Then Obj.Run "shutdown /f /s /t 0" End If For 30 Delay 1000 Next Goto Start End If End Event
按键精灵定时关机最新版
按键精灵自动关机脚本
电脑关机脚本