Last active
August 31, 2022 08:12
-
-
Save gaborbata/1c4791286b4d359e0c5673be718e6515 to your computer and use it in GitHub Desktop.
Caffeine for the computer ☕
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Run with: wscript.exe caffeine.vbs | |
Set WshShell = WScript.CreateObject("WScript.Shell") | |
WScript.Echo "Caffeine started" | |
While Hour(Now) < 18 | |
WshShell.SendKeys "+{F16}" | |
WScript.Sleep 50000 | |
Wend | |
WshShell.Run "shutdown.exe /s /t 10 /f", 0, True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment