Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modern Day Scroll Lock?
#2
Function ScrollLock
Trigger J 0x5     Help - how to add the trigger to the macro
Code:
Copy      Help
;This function runs when you press Scroll Lock.
;It works only when Scroll Lock is toggled on.


if(getopt(nthreads)>1) ret

rep
,0.2
,
,;is Scroll Lock is on?
,ifk-(J 1) ret
,
,;get focused control and caret pos in it
,POINT p
,int h=GetCaretXY(p.x p.y 0 0 1)
,if(!h) continue
,
,;get h client rect
,RECT r
,GetClientRect h &r
,if(r.bottom<150) continue
,
,;is cursor near bottom?
,if(p.y<r.bottom-100) continue
,
,;is Ctrl etc pressed?
,if(GetMod) continue
,
,;is mouse button pressed?
,ifk((1)) continue
,ifk((2)) continue
,ifk((3)) continue
,
,;scroll 1 tick down
,MouseWheel -1 h
,;out "scrolled"

;z
;z
;z
;z
;z
;z
;z
;z
;z
;z
;z
;z
;z
;z
;z
;z
;z
;z


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)