Skip to content

Instantly share code, notes, and snippets.

@nicksterx
Created October 7, 2019 18:30
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 nicksterx/0a8e68a129b014b8c6ec162e880c504d to your computer and use it in GitHub Desktop.
Save nicksterx/0a8e68a129b014b8c6ec162e880c504d to your computer and use it in GitHub Desktop.
Flash the leds on your keyboard progressively faster
$wsh = New-Object -ComObject WScript.Shell
$speed = 100
while ($speed -gt 0) {
$wsh.SendKeys('{NUMLOCK}')
Start-Sleep -Milliseconds $speed
$wsh.SendKeys('{CAPSLOCK}')
Start-Sleep -Milliseconds $speed
$wsh.SendKeys('{SCROLLLOCK}')
Start-Sleep -Milliseconds $speed
$speed=$speed-1
Write-Host $speed
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment