Advertisement
Guest User

scroller

a guest
Oct 13th, 2021
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Add-Type -AssemblyName System.Windows.Forms
  2. While ($true){
  3.  
  4. $X = [System.Windows.Forms.Cursor]::Position.X
  5. $Y = [System.Windows.Forms.Cursor]::Position.Y
  6.  
  7. sleep 2
  8. $newX = [System.Windows.Forms.Cursor]::Position.X
  9. $newY = [System.Windows.Forms.Cursor]::Position.Y
  10.  
  11. if (($X -ne $newX) -or ($Y -ne $newY)){
  12.     Write-Host "Mouse moved"
  13.     break
  14. }
  15. else {
  16.     [System.Windows.Forms.SendKeys]::SendWait("{END}")
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement