Last active
April 3, 2024 21:05
-
-
Save CodeByAidan/c3dd0509b6f2d804175e9864ad7bad52 to your computer and use it in GitHub Desktop.
turns off when you move your mouse
This file contains 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;$a=@(1..100);$chars="abc";while($true){$c=[System.Windows.Forms.Cursor]::Position;Start-Sleep -Seconds 5;if($c -eq $([System.Windows.Forms.Cursor]::Position)){$randomX=$a|Get-Random;$randomY=$a|Get-Random;$newPosition=New-Object System.Drawing.Point($randomX,$randomY);[System.Windows.Forms.Cursor]::Position=$newPosition;$randomChar=($chars.ToCharArray()|Get-Random -Count $chars.Length)-join"";[System.Windows.Forms.SendKeys]::SendWait($randomChar);$backspaces="{0}"-f('{BACKSPACE}'*$randomChar.Length);[System.Windows.Forms.SendKeys]::SendWait($backspaces)}} |
This file contains 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 | |
$a = @(1..100) | |
$chars = "abc" | |
while ($true) { | |
$c = [System.Windows.Forms.Cursor]::Position | |
Start-Sleep -Seconds 5 | |
if ($c -eq $([System.Windows.Forms.Cursor]::Position)) { | |
$randomX = $a | Get-Random | |
$randomY = $a | Get-Random | |
$newPosition = New-Object System.Drawing.Point($randomX, $randomY) | |
[System.Windows.Forms.Cursor]::Position = $newPosition | |
# Randomize the order of $chars, meaning: "abc" or "bac" or "cab" etc. | |
$randomChar = ($chars.ToCharArray() | Get-Random -Count $chars.Length) -join "" | |
[System.Windows.Forms.SendKeys]::SendWait($randomChar) | |
$backspaces = "{0}" -f ('{BACKSPACE}' * $randomChar.Length) | |
[System.Windows.Forms.SendKeys]::SendWait($backspaces) | |
} | |
} |
This file contains 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;$a=@(1..100);while(1){$c=[System.Windows.Forms.Cursor]::Position;start-sleep -seconds 5;if ($c -eq $([System.Windows.Forms.Cursor]::Position)) {[System.Windows.Forms.Cursor]::Position=New-Object System.Drawing.Point(($a|get-random),($a|get-random))}} |
This file contains 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 | |
$a = @(1..100) | |
while ($true) { | |
$c = [System.Windows.Forms.Cursor]::Position | |
Start-Sleep -Seconds 5 | |
if ($c -eq $([System.Windows.Forms.Cursor]::Position)) { | |
$randomX = $a | Get-Random | |
$randomY = $a | Get-Random | |
$newPosition = New-Object System.Drawing.Point($randomX, $randomY) | |
[System.Windows.Forms.Cursor]::Position = $newPosition | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment