-
-
Save khanhdodang/9f52c4e921dc4f4a59989c3d2cdabd8a to your computer and use it in GitHub Desktop.
Powershell Script to keep the mouse moving
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
Add-Type -AssemblyName System.Windows.Forms | |
while ($true) | |
{ | |
$Pos = [System.Windows.Forms.Cursor]::Position | |
$x = ($pos.X % 500) + 1 | |
$y = ($pos.Y % 500) + 1 | |
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y) | |
Start-Sleep -Seconds 10 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment