Browse Groups

• ... I d heed John s advice regarding finding your way in a document; still, as an illustration of his closing comment on NoteTab s capacities, here s a
Message 1 of 8 , Jun 24, 2010
View Source
"Sarah" <gwilymjj@...> wrote:
>
> Second question- if the clip / button can be expressed in percentages, it would also be useful to be able to go straight to the middle, end of first quarter, 90% etc., because I often have a reasonable idea of where the relevant part of the document is located.
>

I'd heed John's advice regarding finding your way in a document; still, as an illustration of his closing comment on NoteTab's capacities, here's a skeleton clip that should do what I think you're asking for:

:Top
^!Jump 1
^!Goto End
:Bottom
^!Jump Doc_End
^!Goto End
:Quarter
^!Jump ^\$Calc(^\$GetLineCount\$*.25;0)\$
^!Goto End
:Middle
^!Jump ^\$Calc(^\$GetLineCount\$*.5;0)\$
^!Goto End
:Three_Quarters
^!Jump ^\$Calc(^\$GetLineCount\$*.75;0)\$
^!Goto End
:End
^!SetView ^\$GetRow\$:1

If you like, this simple exercise could obviously go a step further and prompt for a specific desired percentage -- instead of providing its set list of choices.
• Hi Sarah, Welcome to the list. :-) ... In addition to other suggestions and clips I just want to mention that you can actually do what you want yet another
Message 1 of 8 , Jun 24, 2010
View Source
Hi Sarah,

Welcome to the list. :-)

>Second question- if the clip / button can be expressed in
>percentages, it would also be useful to be able to go straight to
>the middle, end of first quarter, 90% etc., because I often have a
>reasonable idea of where the relevant part of the document is located.

In addition to other suggestions and clips I just want to mention
that you can actually do what you want yet another way. Hit SHIFT +
CTRL + L. That will bring up the "Go to line..." dialogue (it's on
the View menu). It tells you the total number of lines and all you
have to do is estimate what number 25% (or whatever) of that is. Note
that wrapped lines are counted as often is the case with Notetab, so
you may want to turn Word Wrap off (or not).

Lotta
• ... It also comes up with two blinks of a mouse on the line numbers ribbon (if visible). (This eureka hit me just this morning when I was aiming to launch a
Message 1 of 8 , Jun 28, 2010
View Source
loro <tabbie@...> wrote:
>
> (...) Hit SHIFT + CTRL + L. That will bring up the "Go to line..."
> dialogue (it's on the View menu). (...)

It also comes up with two blinks of a mouse on the line numbers' ribbon (if visible).

(This eureka hit me just this morning when I was aiming to launch a clip... while dosing off. So there, a rare proof that even afterwards there might be some benefits from stretching the weekend. :)
• ... confess ... had time ... takes me to ... how many ... help. ... end of ... where ... Sarah, As Axel wrote, Ctrl+End is the immediate and easiest to go to
Message 1 of 8 , Jun 30, 2010
View Source
Sarah wrote:
> Excuse me everyone,
> I joined this group hoping to learn some clip programming but must
confess
> that I'm even more confused than ever - though I haven't really
> to study all the comments in detail.

> My first question is:
>
> When I open a LARGE text file, I often only want to go immediately to
> the very end - it would be nice to have a button or clip that
takes me to
> "bottom of page" - scrolling can be irritating and I never know
how many
> lines there are in that particular file, so go to line:xxx doesn't
help.
>
> Can anyone help ?
>
> Second question- if the clip / button can be expressed in percentages,
> it would also be useful to be able to go straight to the middle,
end of
> first quarter, 90% etc., because I often have a reasonable idea of
where
> the relevant part of the document is located.
>
> Can anyone help?
>
>
> Sarah

Sarah,

As Axel wrote, Ctrl+End is the immediate and easiest to go to
clip. It has 'Doc_Start', 'Doc_End' and 19 other choices in 5%
increments between those 2.

to each file of varying size in turn, that you might be
scanning/editing. The clip doesn't display percentages, instead it
displays actual line numbers. The clip works very well, I decided to
incorporate it into my own personal clipbar.

You will need to know how to copy and paste the clip into one of your
libraries and then create an icon entry for the clip in one of your
clipbars for very fast access. If you have any problems ask for help
on the list.

Here's the Clip; Long, wrapped lines, shouldn't be a problem.

--------------------------------------

; • Modified-Updated~Created
; • hrs ø 2010.06.30_12:51:58p
^!SetWizardWidth 55
^!SetScreenUpdate 0
^!SetListDelimiter |
;_
^!SetArray
%pct%="05|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95"
^!Set %loop%=0; %count%=^%pct0%
;_
:LOOP
^!Inc %loop%
^!Append %here%=^\$Calc(^\$GetLineCount\$ * .^%pct^%loop%%;0)\$^%nL%
^!If ^%loop% < ^%count% LOOP
;_
^!Set %where%=^\$StrReplace("^%nL%";"|";"^\$StrTrim("^%here%")\$";0;0)\$;
%here%=""
DOCUMENT'?==Doc_Start|^%where%|_Doc_End}
;_
^!Jump 1
^!StatusShow Jumping to •• ^\$StrReplace("_";"";"^%where%";0;0)\$ ••
^!Delay 15
^!Jump ^%where%
^!SetView ^\$Calc(^\$GetRow\$ - 11)\$:1

--------------------------------------

·············································
ºvº SL_day# 181 - created 2010.06.30_19.01.01

• If Strike isn't Settled Quickly, It May Last a While

€ hrs € hsavage € pobox € com
• ... Sarah and list, The clip above needs a slight mod. If the variable memory isn t cleared upon the next execution the line counter has more than the
Message 1 of 8 , Jun 30, 2010
View Source
hsavage wrote:

> clip. It has 'Doc_Start', 'Doc_End' and 19 other choices in 5%
> increments between those 2.
>
> The clip should be especially helpful with large files. It adjusts
> to each file of varying size in turn, that you might be
> scanning/editing. The clip doesn't display percentages, instead it
> displays actual line numbers. The clip works very well, I decided to
> incorporate it into my own personal clipbar.
>
> You will need to know how to copy and paste the clip into one of your
> libraries and then create an icon entry for the clip in one of your
> clipbars for very fast access. If you have any problems ask for help
> on the list.
>
> Here's the Clip; Long, wrapped lines, shouldn't be a problem.
>
> --------------------------------------
>
> ; • Modified-Updated~Created
> ; • hrs ø 2010.06.30_12:51:58p
> ^!SetWizardWidth 55
> ^!SetScreenUpdate 0
> ^!SetListDelimiter |
> ;_
> ^!SetArray
> %pct%="05|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95"
> ^!Set %loop%=0; %count%=^%pct0%
>
> --------------------------------------

Sarah and list,

The clip above needs a slight mod. If the variable memory isn't
cleared upon the next execution the line counter has more than the
designated entries in it. This is the fix.

If Statusshow and Delay are commented or removed execution is instant.

--------------------------------------
; • Modified-Updated~Created
; • hrs ø 2010.06.30_12:51:28p
^!SetWizardWidth 55
^!SetScreenUpdate 0
^!SetListDelimiter |
;_
^!SetArray
%pct%="05|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95"
^!Set %loop%=0; %count%=^%pct0%
:LOOP
^!Inc %loop%
^!Append %here%=^\$Calc(^\$GetLineCount\$ * .^%pct^%loop%%;0)\$^%nL%
^!If ^%loop% < ^%count% LOOP
;_
^!Set %here%=^\$StrReplace("^%nL%";"|";"^\$StrTrim("^%here%")\$";0;0)\$
DOCUMENT'?==Doc_Start|^%here%|_Doc_End}
^!IfCancel CLEAR
^!Jump 1
^!StatusShow Jumping to •• ^\$StrReplace("_";"";"^%where%";0;0)\$ ••
^!Delay 12
^!Jump ^%where%
^!SetView ^\$Calc(^\$GetRow\$ - 11)\$:1
:CLEAR
^!Set %here%=^%empty%; %where%=^%empty%
--------------------------------------

·············································
ºvº SL_day# 182 - created 2010.07.01_00.12.03