function ShutDown() dim objShell Set objShell = WScript.CreateObject("Wscript.Shell")
dim Application set Application = CreateObject("Shell.Application.1") Application.ShutdownWindows() dim upi for upi = 0 to 4 WScript.Sleep(50) objShell.sendKeys("{UP}") next For upi = 1 to ActionID WScript.Sleep(50) objShell.sendKeys("{DOWN}") next '使用時,請把下行的注釋符去掉 'objShell.sendKeys("{ENTER}") end function
While true if DateDiff("s", Now, ActionTime) 0 then ShutDown() end if WScript.Sleep(5*1000) wend