Skip to content

Instantly share code, notes, and snippets.

@vejandla
Forked from MatthewSteeples/mousemove.ps1
Created December 23, 2022 03:53
Show Gist options
  • Select an option

  • Save vejandla/62a20920332d2c26e44e93f64bc5edc9 to your computer and use it in GitHub Desktop.

Select an option

Save vejandla/62a20920332d2c26e44e93f64bc5edc9 to your computer and use it in GitHub Desktop.

Revisions

  1. @MatthewSteeples MatthewSteeples created this gist Feb 26, 2015.
    10 changes: 10 additions & 0 deletions mousemove.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    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
    }