Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- SetBatchLines -1
- Process Priority,,R
- BlockInput Mouse ; user mouse input is ignored during MouseMove
- CoordMode Mouse, Screen ; absolute coordinates
- SysGet m, Monitor ; get the screen edges
- mTop += 1, mBottom -= 2
- SetMouseDelay -1 ; fastest action
- MButton::
- Click M Down
- MouseGetPos x0, y0 ; get initial mouse pointer location
- SetTimer WatchMouse, 1 ; run the subroutine fast (10..16ms)
- Return
- MButton Up::
- Click M Up
- SetTimer WatchMouse, Off
- Return
- WatchMouse:
- MouseGetPos x, y ; get current mouse position
- y0 += (y0-y), y0 := y0 < mTop ? mTop : (y0 > mBottom ? mBottom : y0)
- MouseMove x, y0, 0 ; set new position as old, for the next timer
- Return
Advertisement
Add Comment
Please, Sign In to add comment