Skip to content

Instantly share code, notes, and snippets.

@cmbaughman
Created March 14, 2025 13:32
Show Gist options
  • Save cmbaughman/45c9890bf0de2442ab96c988c33c6c03 to your computer and use it in GitHub Desktop.
Save cmbaughman/45c9890bf0de2442ab96c988c33c6c03 to your computer and use it in GitHub Desktop.
Simple bat file calling powershell to move the mouse every 5 minutes.
@echo off
setlocal
:loop
powershell -command "[void][System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point((Get-Random -Minimum 0 -Maximum 1920), (Get-Random -Minimum 0 -Maximum 1080))"
timeout /t 300 /nobreak >nul
goto loop
endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment