Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Laszlo's with minimal modification for Middle button Hotkey
- #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::
- MouseGetPos x0, y0 ; get initial mouse pointer location
- SetTimer WatchMouse, 1 ; run the subroutine fast (10..16ms)
- Return
- MButton Up::SetTimer WatchMouse, Off
- WatchMouse:
- MouseGetPos x, y ; get current mouse position
- y0 += 2*(y0-y), y0 := y0 < mTop ? mTop : (y0 > mBottom ? mBottom : y0)
- MouseMove x, y0, 0 ; set new position as old, for the next timer
- Return
- !z::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement