Advertisement
PuriDevelopers

Untitled

Mar 24th, 2023 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. ;Laszlo's with minimal modification for Middle button Hotkey
  2. #NoEnv
  3. SetBatchLines -1
  4. Process Priority,,R
  5.  
  6. BlockInput Mouse ; user mouse input is ignored during MouseMove
  7. CoordMode Mouse, Screen ; absolute coordinates
  8. SysGet m, Monitor ; get the screen edges
  9. mTop += 1, mBottom -= 2
  10. SetMouseDelay -1 ; fastest action
  11.  
  12. MButton::
  13. MouseGetPos x0, y0 ; get initial mouse pointer location
  14. SetTimer WatchMouse, 1 ; run the subroutine fast (10..16ms)
  15. Return
  16. MButton Up::SetTimer WatchMouse, Off
  17.  
  18. WatchMouse:
  19. MouseGetPos x, y ; get current mouse position
  20. y0 += 2*(y0-y), y0 := y0 < mTop ? mTop : (y0 > mBottom ? mBottom : y0)
  21. MouseMove x, y0, 0 ; set new position as old, for the next timer
  22. Return
  23.  
  24. !z::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement