Last active
February 22, 2024 09:30
-
-
Save mortalis13/01e9d0db3c188525e7fa2d17f0a7e90f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Script to trigger ScrollLock key each 10 min | |
# Save as script.ps1 and run from PowerShell or from context menu "Run with PowerShell" | |
$WShell = New-Object -Com "Wscript.Shell" | |
while (1) {$WShell.SendKeys("{SCROLLLOCK}"); sleep 600} | |
# To execute the script in background, run it from the console | |
# To stop it, kill the powershell.exe process | |
powershell.exe -ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden script.ps1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment