Skip to content

Instantly share code, notes, and snippets.

@gaborbata
Last active August 31, 2022 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaborbata/1c4791286b4d359e0c5673be718e6515 to your computer and use it in GitHub Desktop.
Save gaborbata/1c4791286b4d359e0c5673be718e6515 to your computer and use it in GitHub Desktop.
Caffeine for the computer ☕
' 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