Skip to content

Instantly share code, notes, and snippets.

@Kline-
Created December 28, 2021 13:38
Show Gist options
  • Save Kline-/3dbffcd4e03d061f9ebb3556a346c71b to your computer and use it in GitHub Desktop.
Save Kline-/3dbffcd4e03d061f9ebb3556a346c71b to your computer and use it in GitHub Desktop.
Prevent Windows screensaver and idle timer from activating.
Set objShell = WScript.CreateObject("WScript.Shell")
Do While True
objShell.SendKeys("{SCROLLLOCK}")
WScript.Sleep(100)
objShell.SendKeys("{SCROLLLOCK}")
WScript.Sleep(24000)
Loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment