by brixon · 6y ago · 0 comments
Echo "Keep-alive with Scroll Lock..."
$WShell = New-Object -com "Wscript.Shell"
while ($true)
{
$WShell.sendkeys("{SCROLLLOCK}")
Start-Sleep -Milliseconds 300
$WShell.sendkeys("{SCROLLLOCK}")
Start-Sleep -Seconds 240
}while true; do xdotool key Pause; sleep 240; done
Note that you use xdotool which is external so you are cheating. On Winodws you can do better with AHK which is compared to xdotool like spaceship to bucycle.
Note that comparing AHK to xdotool is like comparing a Titanic-sized roll of Flex Tape to duct tape. I don’t use boats that have taken a lot of damage, so I don't need Titanic-sized Flex Tape.