Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modern Day Scroll Lock?
#1
Remember scroll lock? It would allow you to keep your cursor in the middle of the screen as you edited. I have missed that feature for a million years.

I do a lot of text editing and it often involves search and replace, or just quickly going through a lot of text. I always end up with my cursor at the bottom, wishing that I could know what was in front of me so I could work faster, and without messing with controlling the pages.

Could QM automatically keep the cursor (I really mean the insertion point, not the mouse cursor) in the middle of the Y axis of the screen so I can see what is below it all the time?

My workaround has been to use a macro that moves the text up so many lines at a time, but it's a crude solution, just doing 20 Ds and 20 Us.

I'd love to know of any better solutions, whether or not they are exactly like scroll lock.
- Bob
#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
#3
Hi, thanks, this is very nice!

Word '97 doesn't react to it. Is there a way to convince it to cooperate?

I see J 0x5 is the trigger. Where do I apply that trigger? Then to trigger it, I do page down and scroll lock?

I tried pasting it into the keyboard commends as usual, but then when I look again, it shows no triggers.
- Bob
#4
Paste in the Trigger edit box in the toolbar above the macro list.

Not all apps give caret position. I don't know other ways to get it. With Office 2003 works.
#5
Hi, thanks.

That's interesting. So the hot key and trigger in the toolbar can be different. Word still isn't cooperating. Maybe somebody (maybe me) will think of some setting in Word that could get in the way or something.

...because this is a really helpful macro!

Macro ScrollEffect
Trigger J 0x5     Help - how to add the trigger to the macro
[code](`c);This function runs when you press Scroll Lock.(`)
(`c);It works only when Scroll Lock is toggled on.(`)


(`fq)if(`)(`p)((`)(`fq)getopt(`)(`p)((`)nthreads(`p))(`)(`o)>(`)(`n)1(`)(`p))(`) (`fq)ret(`)

etc.
- Bob


Forum Jump:


Users browsing this thread: 1 Guest(s)