Skip to content

Instantly share code, notes, and snippets.

@rdbuf
Created September 4, 2021 20:39
Show Gist options
  • Save rdbuf/f6e4cecf333b6d1311d59fa6913cd17d to your computer and use it in GitHub Desktop.
Save rdbuf/f6e4cecf333b6d1311d59fa6913cd17d to your computer and use it in GitHub Desktop.
move_mouse.ps1
Add-Type -AssemblyName System.Windows.Forms
while ($true)
{
$Pos = [System.Windows.Forms.Cursor]::Position
$x = $pos.X + 1
$y = $pos.Y + 1
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($Pos.X, $Pos.Y)
Start-Sleep -Seconds 10
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment