Scrolling Smoothly through Large Scripts
Scott Rossi
scott at tactilemedia.com
Thu Dec 24 16:20:48 EST 2015
Hi Ray:
Try this in a script that you can insert or remove from the front:
on rawKeyDown K
if short name of the target is not "script" then pass rawKeyDown
if ("stack" && quote & "revNewScriptEditor") is not in long owner of
the target then pass rawKeyDown
put effective textHeight of the target into ETH
if K is among the items of "65308,65309" then
if K is 65308 then set vScroll of the target to (vScroll of the
target + ETH)
if K is 65309 then set vScroll of the target to (vScroll of the
target + (ETH * -1))
exit rawKeyDown
end if
pass rawKeyDown
end rawKeyDown
This works here and increments/decrements the scroll of the script editor
by a single line.
Regards,
Scott Rossi
Creative Director
Tactile Media, UX/UI Design
On 12/24/15, 12:17 PM, "use-livecode on behalf of Ray"
<use-livecode-bounces at lists.runrev.com on behalf of ray at linkit.com> wrote:
>Peter - thanks for the idea. I've tried it along with a few variations
>on it but unfortunately to no avail. I can see it getting trapped but
>for some reason my script editor window always jumps about 5 or 6 lines
>when I scroll one notch using the mouse wheel. Any ideas? I'm
>experimenting with a script window of about 3000 lines.
>
>On 12/24/2015 1:08 PM, Peter M. Brigham wrote:
>> Try this (untested). Put the following into a frontscript. Watch for
>>email-induced linebreaks.
>>
>> on rawkeydown n
>> if not (the name of the selectedfield contains
>>"revNewScriptEditor") then pass rawkeydown
>> if the optionkey is down then pass rawkeydown
>> -- use optionkey to return to usual scrolling, for scanning
>>through long scripts
>> put the long id of the selectedfield into sFld
>> put the textheight of sFld into txtHt
>> put the scroll of sFld into oldScr
>> switch n
>> case "65308" -- up
>> set the scroll of sFld to oldScr + txtHt
>> break
>> case "65309" -- down
>> set the scroll of sFld to oldScr - txtHt
>> break
>> default
>> pass rawkeydown
>> end switch
>> end rawkeydown
>>
>> -- Peter
>>
>> Peter M. Brigham
>> pmbrig at gmail.com
>> http://home.comcast.net/~pmbrig
>>
>> On Dec 24, 2015, at 11:59 AM, Ray wrote:
>>
>>> Seasons Greetings on Christmas Eve!
>>>
>>> Does anybody know how to scroll just one line per mouse-wheel movement
>>>through the script editor window?
>>>
>>> I typically view several thousand lines at a time. Each push of the
>>>little scroll wheel on my mouse produces an abrupt 'jerk' of 10 or 15
>>>lines. It's really hard on the eyes by the end of the day.
>>>
>>> Ideally scrolling would be totally smooth without even jerking one
>>>line at a time, but one line at a time is better than a random group at
>>>a time causing me to re-orient myself.
>>>
>>> Many thanks!
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>>subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list