Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Add-Type -AssemblyName System.Windows.Forms
- While ($true){
- $X = [System.Windows.Forms.Cursor]::Position.X
- $Y = [System.Windows.Forms.Cursor]::Position.Y
- sleep 2
- $newX = [System.Windows.Forms.Cursor]::Position.X
- $newY = [System.Windows.Forms.Cursor]::Position.Y
- if (($X -ne $newX) -or ($Y -ne $newY)){
- Write-Host "Mouse moved"
- break
- }
- else {
- [System.Windows.Forms.SendKeys]::SendWait("{END}")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement