Loading ...
Sorry, an error occurred while loading the content.

[Clip] Re: Help with extra lines & spaces

Expand Messages
  • Sky-Surfer
    Well, unfortunately, it IS a bit more complicated than that. The clip I am in need of, will paste at the bottom of the current subject within an outlined
    Message 1 of 22 , Nov 2, 1999
    • 0 Attachment
      Well, unfortunately, it IS a bit more complicated than that.  The clip I am in need of, will paste at the bottom of the current subject within an outlined document.  Then (and here's the catch) it must back-space anywhere from 0-4 times until it reaches actual text.  (In other words, what I am pasting has different endings.  I need to delete all the extra spaces & carrage returns from the bottom.)
       
      (Hope this makes more sense...)
       
       
       
      > In an outlined document, what clip-command should I use (create)
      > to delete ALL of the ending paragraph markers
      & spaces from the
      > bottom of ONE subject only...???  (From
      within a subject, I want
      > to delete from the bottom going upwards until I
      hit actual text.
      > (Usually a period))
       
      >>
      >> This assumes that your ending
      is always going to be the same.  A
      >> more complicated Clip can be
      built if they we have any difference
      >> such as even a
      space.
      >>
      >> ^!Jump Doc_End
      >> ^!Find
      "-----------------------------" SB
      >> ^!Jump Line_Start
      >>
      ^!Replace "^P  ^P  ^P  ^P^P" >> "^p^p" SB
      >>
       

       
    • Claes Gauffin
      Hi Sky-surfer, ... Try this. It is done in haste, and rather rough, but I think should work. Regards /Claes ^!KEYBOARD CTRL+End CTRL+V ... ^!Select -2 ^!If
      Message 2 of 22 , Nov 2, 1999
      • 0 Attachment
        Hi Sky-surfer,

        At 08:54 1999-11-02 -0500, you wrote:

        >Well, unfortunately, it IS a bit more complicated than that.
        >The clip I am in need of, will paste at the bottom of the
        >current subject within an outlined document. Then (and
        >here's the catch) it must back-space anywhere from 0-4 times
        >until it reaches actual text. (In other words, what I am
        >pasting has different endings. I need to delete all the
        >extra spaces & carrage returns from the bottom.)

        Try this. It is done in haste, and rather rough, but I think should work.

        Regards /Claes

        ^!KEYBOARD CTRL+End CTRL+V
        :loop
        ^!Select -2
        ^!If ^$GetSelection$ = ^%NL% loop
        ^!jump +1
        ^!Select +999
        ^!Keyboard DELETE
        ^!InsertText ^%NL%-------------------------^%NL%
      • Jody
        Hi Sky-Surfer, ... Did you try the Clip? It does not matter how many spaces are at the end for the Clip to do what you asked for. You would still have your
        Message 3 of 22 , Nov 2, 1999
        • 0 Attachment
          Hi Sky-Surfer,

          > Well, unfortunately, it IS a bit more complicated than that.
          > The clip I am in need of, will paste at the bottom of the
          > current subject within an outlined document. Then (and here's
          > the catch) it must back-space anywhere from 0-4 times until it
          > reaches actual text. (In other words, what I am pasting has
          > different endings. I need to delete all the extra spaces &
          > carrage returns from the bottom.)

          Did you try the Clip? It does not matter how many spaces are at
          the end for the Clip to do what you asked for. You would still
          have your last line have the two spaces on it which I guess is
          your preference to have spaces on blank lines. If you wanted the
          last two deleted as well, you could add them to the Clip.

          Are the two spaces on blanks lines mandatory for you? Are they
          be inserted by your Clip or the way the text is coming in on the
          newsgroup or list you are getting them from. Or, is that
          something that is coming in your eMail from the html formatting
          you have turned on? You might want to turn that off anyway
          because there are people that cannot read your posts and those
          that answer have to do extra work to strip the formatting out
          before reposting. Thanks!

          If you don't care if the blanks are there are not and it is not
          something in your clip adding it you could get rid of them by
          turning Trim Blanks on in Options then run this Clip.

          ^!Keyboard Ctrl+End Ctrl+V
          ^!Save
          ^!IfTrue ^$IsEmpty(^$GetLine$)$ Next else Skip_2
          ^!Replace "^p" >> "" SB
          ^!Goto Skip_-2
          ^!InsertText ^p

          ^!Find "-----------------------------" SB
          ^!Jump Line_Start
          ^!IfTrue ^$IsEmpty(^$GetLine$)$ Next else Skip_2
          ^!Replace "^p" >> "" SB
          ^!Goto Skip_-2
          ^!InsertText ^p

          If there are no spaces and they are just in the mail, then you
          can take out the ^!Save line.


          Happy Clip'n!
          Jody

          http://www.sureword.com/notetab

          The NoteTab Clip List...
          mailto:Ntb-Clips-Subscribe@...
          mailto:Ntb-Clips-UnSubscribe@...
        • Sky-Surfer
          Hiya Claus, I have tried & tested your suggestion, and I must admit, it s the best clip I have seen for this so far. But there is one lil glitch. It won t
          Message 4 of 22 , Nov 2, 1999
          • 0 Attachment
            Hiya Claus,

            I have tried & tested your suggestion, and I must admit, it's the best clip
            I have seen for this so far. But there is one lil' glitch. It won't touch
            any of the extra spaces or tabs that are placed at the end of the last line.
            (I can still use it though - Thanx!)

            I would really like one that simply backspaces multiple times UNTIL it
            reaches actual text. I'm not too familiar with the LOOP, nor the IF
            command, or I would try & modify your shared clip. 8-(

            Can somebody please help me...?!?!?!?! (Please don't tell me this is an
            "impossibility" with NTP - I HATE that word...!!! 8-)

            Thanx in advance!


            On Tuesday, Nov. 02, 1999 9:15 AM, you wrote:

            > Hi Sky-surfer,
            >
            > At 08:54 1999-11-02 -0500, you wrote:
            >
            > >Well, unfortunately, it IS a bit more complicated than that.
            > >The clip I am in need of, will paste at the bottom of the
            > >current subject within an outlined document. Then (and
            > >here's the catch) it must back-space anywhere from 0-4 times
            > >until it reaches actual text. (In other words, what I am
            > >pasting has different endings. I need to delete all the
            > >extra spaces & carrage returns from the bottom.)
            >
            > Try this. It is done in haste, and rather rough, but I think should work.
            >
            > Regards /Claes
            >
            > ^!KEYBOARD CTRL+End CTRL+V
            > :loop
            > ^!Select -2
            > ^!If ^$GetSelection$ = ^%NL% loop
            > ^!jump +1
            > ^!Select +999
            > ^!Keyboard DELETE
            > ^!InsertText ^%NL%-------------------------^%NL%
          • Jody
            Hi Sky-Surfer, ... The clips below should make you last topic look like the rest. (I put the two spaces back in *before* the bottom ------ separator ------
            Message 5 of 22 , Nov 2, 1999
            • 0 Attachment
              Hi Sky-Surfer,

              > I would really like one that simply backspaces multiple times
              > UNTIL it reaches actual text. I'm not too familiar with the
              > LOOP, nor the IF command, or I would try & modify your shared
              > clip. 8-(

              The clips below should make you last topic look like the rest.
              (I put the two spaces back in *before* the bottom "------
              separator ------" so it would be uniform with the rest. you can
              add them in Claes' Clip in the Insert line.

              >Can somebody please help me...?!?!?!?! (Please don't tell me this is an
              >"impossibility" with NTP - I HATE that word...!!! 8-)

              Of course NoteTab can do it. It is just a matter of knowing what
              you need. ;)

              ^!KEYBOARD CTRL+End CTRL+V
              ^!Replace "^P ^P" >> "^p^p" SB
              :loop
              ^!Select -2
              ^!If ^$GetSelection$ = ^%NL% loop
              ^!jump +1
              ^!Select +999
              ^!Keyboard DELETE
              ^!InsertText ^%NL%-------------------------^%NL%

              Claes' is definitley shorter, but I am sending this again for the
              code that you can get out of it for other things. I should work
              as well. There are other methods to do as well. I like using
              the code I did though just 'cause it pleases me mainly because
              when soing a lot of loops (in other clips) it is faster when no
              selection has to be made. In your case though Claes' is just
              fine as his Clips always are.

              ^!Jump Doc_End
              ^!Replace "^P ^P" >> "^p^p" SB
              ^!Find "-----------------------------" SB
              ^!Jump Line_Start
              ^!Keyboard Ctrl+End
              ^!IfTrue ^$IsEmpty(^$GetLine$)$ Next else Skip_2
              ^!Replace "^p" >> "" SB
              ^!Goto Skip_-2
              ^!InsertText ^p

              ^!Jump -2
              ^!IfTrue ^$IsEmpty(^$GetLine$)$ Next else Skip_2
              ^!Replace "^p" >> "" SB
              ^!Goto Skip_-2
              ^!InsertText ^p
              ^!Replace "^P ^P ^P ^P^P" >> "^p " SB

              Happy Clip'n!
              Jody

              http://www.sureword.com/notetab

              The NoteTab Clip List...
              mailto:Ntb-Clips-Subscribe@...
              mailto:Ntb-Clips-UnSubscribe@...
            • Sky-Surfer
              Hiya Jody, You have royally lost me on your last post. I take the blame though... I guess I didn t describe my prediciment clearly enough... Here we go
              Message 6 of 22 , Nov 2, 1999
              • 0 Attachment
                Hiya Jody,

                You have royally lost me on your last post. I take the blame
                though... I guess I didn't describe my prediciment clearly enough...
                Here we go again. 8-)

                > > Well, unfortunately, it IS a bit more complicated than that.
                > > The clip I am in need of, will paste at the bottom of the
                > > current subject within an outlined document. Then (and here's
                > > the catch) it must back-space anywhere from 0-4 times until it
                > > reaches actual text. (In other words, what I am pasting has
                > > different endings. I need to delete all the extra spaces &
                > > carrage returns from the bottom.)
                >
                > Did you try the Clip?

                Yes - both of them. Neither of them affect the end of the document
                AFTER the paste.

                Please ignore the fact that I am doing a paste. Instead pretend that
                *from the current cursor position* I want to simply back-space a few
                times until I reach actual text.

                In other words: The clip I am looking for will delete all spaces,
                tabs, and carrage returns from the current cursor position going
                backwards until text is reached. (Usually a period)
                Sorry if I was vague in my last posts... 8-(

                > Are the two spaces on blanks lines mandatory for you?

                No - My whole object here is to get rid of extra spaces & blank
                lines.

                > Are they be inserted by your Clip or the way the text is coming in
                > on the newsgroup or list you are getting them from.

                The unwanted spaces/tabs/carrage returns are unwittingly copied from
                an external source. (I currently check my mail through Outlook
                Express)

                > Or, is that something that is coming in your eMail from the html
                > formatting you have turned on? You might want to turn that off
                > anyway because there are people that cannot read your posts and
                > those that answer have to do extra work to strip the formatting
                > out before reposting. Thanks!

                Good call... This post (and all future to this NG) should be now in
                plain text.

                Sorry to complicate what is probably the easiest clip imaginable.
                (I'm still open for help though... hint/hint)

                I know you all will come through for me...


                /\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\
                Going where the wind goes - Blooming like a red rose
                \//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\/
              • Jody
                Hi Sky-Surfer, Here is just another way for you to study. It is similar to Claes but uses a little bit different code. If you do not want the two spaces
                Message 7 of 22 , Nov 2, 1999
                • 0 Attachment
                  Hi Sky-Surfer,

                  Here is just another way for you to study. It is similar to
                  Claes' but uses a little bit different code. If you do not
                  want the two spaces above your last ------- take them out of
                  the insert line. (Sorry about my other one that used Jump
                  Doc_End. I forgot you were pasting from the Clipboard. I was
                  testing with the text already there.) You might need to add
                  another ^p to the first Replace that gets those two spaces at the
                  end if you end up with two blank lines at the end. It is hard to
                  know in eMail exactly what you have. There is still more ways of
                  doing it and also to get the two spaces at the bottom, but that
                  seems the easiest to me.

                  ^!Keyboard Ctrl+V Ctrl+End
                  ^!Replace "^P ^P" >> "^p^p" SB
                  ^!Keyboard Ctrl+End
                  ^!Jump -4
                  ^!If ^$GetLine$ > 2 Skip_2 else Next
                  ^!IfSame "^$GetLine$" " " Next Else Skip_2
                  ^!Jump -1
                  ^!Goto Skip_-3
                  ^!Keyboard Shift+Ctrl+End
                  ^!Toolbar Clear All
                  ^!InsertText ^p ^p-----------------------^p

                  Adjust your --- length of course. <g>

                  Thanks for taking tuning your formatting off. :)

                  Bye for now,
                  Jody Adair
                  Prov. 3:5-7; 4:23

                  http://www.sureword.com/sojourner
                  http://www.sureword.com/kjb1611
                  http://www.sureword.com/notetab
                • Sky-Surfer
                  I am still in search of... *From the current cursor position* I need a clip that will simply back-space a few times until it reaches actual text. In other
                  Message 8 of 22 , Nov 2, 1999
                  • 0 Attachment
                    I am still in search of...

                    *From the current cursor position* I need a clip that will simply
                    back-space a few times until it reaches actual text. In other words:
                    The clip I am looking for will delete all spaces, tabs, and carrage
                    returns from the current cursor position going backwards until text
                    is reached. (Usually a period)

                    Sorry if I was vague in my last posts... 8-(
                    Can anyone help me?


                    On Nov. 2nd, Jody suggested:

                    > ^!Keyboard Ctrl+V Ctrl+End
                    > ^!Replace "^P ^P" >> "^p^p" SB
                    > ^!Keyboard Ctrl+End
                    > ^!Jump -4
                    > ^!If ^$GetLine$ > 2 Skip_2 else Next
                    > ^!IfSame "^$GetLine$" " " Next Else Skip_2
                    > ^!Jump -1
                    > ^!Goto Skip_-3
                    > ^!Keyboard Shift+Ctrl+End
                    > ^!Toolbar Clear All
                    > ^!InsertText ^p ^p-----------------------^p


                    Getting warmer I think, although this last clip you sent me bugged my
                    'puter out a bit. (Flashed a million messages in my status bar and
                    gave me a clip-book drop down menu, right smack dab in the middle of
                    my document...?!?!?! (Just like a JavaScript drop down menu - I kid
                    you not!))

                    Anyway, you did enlighten me to a valuable clip command in your last
                    post. (So simple, yet so sweet!)

                    ^!Keyboard Shift+Ctrl+End
                    ^!Toolbar Clear All

                    This mini-clip would work perfectly if I could just add one more
                    command to the top. (Which command you say...?? Well that's a very
                    good question. Which ever command would relocate my curser *directly
                    after* the last actual text within an outlined topic...???)

                    OHH-NOO! There I go with the run-on sentences again...!!!

                    I guess my first two paragraphs in this post depicts it best...
                    I should have stopped while I was ahead... LOL


                    > Thanks for taking tuning your formatting off. :)

                    Thanx for pointing out my carelessness. :)




                    Seek out the truth - and Ye shall find it...
                  • Jody
                    Hi Sky-Surfer, ... It went into a loop. (Ctrl+Alt to stop). Perhaps there was Paste Board conflict which I suspect you are using or you might have been using
                    Message 9 of 22 , Nov 2, 1999
                    • 0 Attachment
                      Hi Sky-Surfer,

                      > Flashed a million messages in my status bar

                      It went into a loop. (Ctrl+Alt to stop). Perhaps there was
                      Paste Board conflict which I suspect you are using or you might
                      have been using my broke one. :(

                      Here is from the other post I was working on when your latest
                      came it. Hopefully this will do you. If not, Claes is coming
                      on shift after awhile. <bg> I have no problem working on it
                      though.

                      > In other words: The clip I am looking for will delete all
                      > spaces, tabs, and carrage returns from the current cursor
                      > position going backwards until text is reached.

                      You can take the Jump -4 out if you want. I just didn't see any
                      sense in checking lines that obviously we wanted to get rid of.

                      ^!Keyboard Ctrl+V Ctrl+End
                      ^!Jump -4
                      ^!Find "[a-z].*" SBRI
                      ^!IfError Next Else Skip_2
                      ^!Jump -1
                      ^!Goto Skip_-3
                      ^!Jump Select_End
                      ^!Keyboard Shift+Ctrl+End
                      ^!Toolbar Clear All
                      ^!InsertText ^p^p----------------------------^p

                      If, you are careful to always select the same way so that you
                      always have the same amount of lines underneath the text, then
                      you could do this replacing nnn with the number:

                      ^!Keyboard Ctrl+V Ctrl+End
                      ^!Jump -nnn
                      ^!Keyboard Shift+Ctrl+End
                      ^!Toolbar Clear All
                      ^!InsertText ^p^p----------------------------^p

                      >> Are the two spaces on blanks lines mandatory for you?
                      >
                      > No - My whole object here is to get rid of extra spaces & blank
                      > lines.

                      See my other post about using Trim Blanks. It will get rid of
                      all those spaces and save you a lot of work.

                      I am curious to why you are get all those ends line that with
                      the extra lines (I understand the spaces).

                      Bye for now,
                      Jody Adair
                      Prov. 3:5-7; 4:23

                      http://www.sureword.com/sojourner
                      http://www.sureword.com/kjb1611
                      http://www.sureword.com/notetab
                    • Claes Gauffin
                      Hi Sky-Surfer, Jody, Here comes the night-shift. Jody, you beat me on the regexp-attempt:-) But when I tried it out, it seemed to me that NTP s somewhat
                      Message 10 of 22 , Nov 2, 1999
                      • 0 Attachment
                        Hi Sky-Surfer, Jody,

                        Here comes the night-shift.
                        Jody, you beat me on the regexp-attempt:-)
                        But when I tried it out, it seemed to me that NTP's somewhat capricious
                        regexp feature couldn't handle backward search. Hence I came up with this.

                        So, dear Sky-Surfer, here is another one. Beware though, here are regular
                        expressions, which is a bit uncharted waters in NTP. You
                        know what the old mapmakers wrote when you were at risk of
                        sailing off the edge of the world: "Hoc est dragones".

                        So, please try it out well before applying in earnest

                        Regards /Claes

                        ^!KEYBOARD CTRL+End CTRL+V
                        :CheckNext
                        ^!Select line
                        ^!Find "[a-z0-9]" HSIR
                        ^!IfError Delete
                        ^!Jump text_end
                        ^!InsertText ^%NL%-------------------------^%NL%
                        ^!Goto exit
                        :Delete
                        ^!Select line
                        ^!Keyboard Backspace
                        ^!Goto CheckNext
                      • Jody
                        Hi Claes, ... Bout time!-) ... I hardly ever use them since I don t know regExp so I forget about them being there. ... It works for me backwards; wonder what
                        Message 11 of 22 , Nov 2, 1999
                        • 0 Attachment
                          Hi Claes,

                          > Here comes the night-shift.

                          'Bout time!-)

                          > Jody, you beat me on the regexp-attempt:-)

                          I hardly ever use them since I don't know regExp so I forget
                          about them being there.

                          > But when I tried it out, it seemed to me that NTP's somewhat
                          > capricious regexp feature couldn't handle backward search.

                          It works for me backwards; wonder what the difference is. I did
                          forget numbers though so this would have failed in mine, but not
                          no more!-) Thanks!

                          BELOW these contents BEFORE the next line separator
                          1.

                          Try this again and see if it goes backwards. I took the
                          Jump -4 out:

                          H=Strip End regExp
                          ^!SetScreenUpDate Off
                          ^!Keyboard Ctrl+End
                          ^!Jump -4
                          ^!Find "[a-z0-9].*" SBRI
                          ^!IfError Next Else Skip_2
                          ^!Jump -1
                          ^!Goto Skip_-3
                          ^!Jump Select_end
                          ^!Keyboard Shift+Ctrl+End
                          ^!Toolbar Clear All
                          ^!InsertText ^p^p^t--- ^$GetDate(yyyy.mm.dd, hh:nn:ss)$ ---^p


                          c ya,
                          jody

                          I can only please one person a day.
                          Today is obviously not your day.
                          Tomorrow doesn't look good either. 8?D

                          http://www.sureword.com/sojourner/
                        • Claes Gauffin
                          Hi Jody, I think we have more or less the same solution. You have as usual those careful little details like screenupdate off and time stamp in the separator
                          Message 12 of 22 , Nov 3, 1999
                          • 0 Attachment
                            Hi Jody,

                            I think we have more or less the same solution. You have as usual those
                            careful little details like screenupdate off and time stamp in the
                            separator line. Nice.

                            A couple of points:

                            - I think your clip would be less ad hoc if you remove the ^!jump -4. It
                            works just as well and is more generic.

                            - With the stubbornness of a cuckoo clock, I insist that find backwards
                            does not work with regexp. You are in fact searching forward in your clip.
                            Try removing the "B" in your ^!Find, and you will see that it works just as
                            beautiful!

                            Regards /Claes
                          • Jody
                            Hi Claes, ... My note said I took it out, but appearently something got my attention before I did. The reason why it was working for me was the jump -4. You
                            Message 13 of 22 , Nov 3, 1999
                            • 0 Attachment
                              Hi Claes,

                              > - I think your clip would be less ad hoc if you remove the
                              > ^!jump -4. It works just as well and is more generic.

                              My note said I took it out, but appearently something got my
                              attention before I did. The reason why it "was working" for me
                              was the jump -4.

                              You are right! B no workie. Thanks! I tested that twice though
                              befor and saw a line get selected. What was happenning though I
                              believe was since it was going -4 on what I was testing (before I
                              got to jump_end it was actually searching forward on a line I was
                              jumping back to. :( Thanks and good ClipNite. I will look at your
                              again tomorrow.

                              The two most common elements in the
                              universe are hydrogen and stupidity.

                              Signed,
                              I. Claim Ignorance

                              Blessed are they who can laugh at themselves
                              for they shall never cease to be amused.

                              mailto:CF@...?subject=subscribe
                            • Sky-Surfer
                              Hiya Jody & Claes, Well, I think we finally have a winner!!! I have learned so very much from both of you - Thank you both for all your help by showing me
                              Message 14 of 22 , Nov 3, 1999
                              • 0 Attachment
                                Hiya Jody & Claes,

                                Well, I think we finally have a winner!!! I have learned so very
                                much from both of you - Thank you both for all your help by showing
                                me various solutions through different eyes...!!! 8-)

                                I have tested all of the clips that you both sent to me -
                                and even experimented with slightly modifying them to make them more
                                applicable for my situation. I have ended up with a clip that
                                combines the best of both worlds...!!
                                (With a few polishing "touch-ups" by me...)

                                For the rest of you reading this, the following clip will basically:

                                * Jump to the end of your document
                                * Paste the clipboard contents
                                --- Here's the tricky part: ---
                                * Delete all spaces, tabs, and carriage returns, from the end
                                * Add a blank line, a dotted line, and another blank line.


                                <--- Copy below this line --->
                                H=PerfectPaste@End
                                ^!Keyboard CTRL+End CTRL+V
                                ^!InsertText ^%NL%^%NL%
                                :Loop
                                ^!Select -2
                                ^!If ^$GetSelection$ = ^%NL% Loop
                                ^!Find "a-z0-9".* SBH
                                ^!Jump Select_End
                                ^!Select +999
                                ^!Keyboard Delete
                                ^!InsertText ^%NL%^%NL%------------------------------^%NL%^%NL%
                                <--- Copy above this line, right --->
                                <--- click over the Clipbook and --->
                                <--- choose "Add from Clipboard" --->


                                NOTE:

                                Notice the second command line. (^!InsertText ^%NL%^%NL%)
                                I had to add this command to add extra lines here, or else, (if there
                                was no extra spaces, tabs, or carriage returns at the end of the
                                clipboard) the clip would *not* add the correct spacing or dotted
                                line separator at the end.

                                Also, for this clip to work smoothly, you must set the document's
                                properties to "Trim White Spaces" in the "Document | Properties"
                                dialogue box. (Otherwise, if there is an odd number of spaces/tabs
                                on the last line with text on it, an unwanted space/tab will remain.)

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

                                Two more questions for the whizzes:

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

                                1) Can either of you help explain the depth of the following
                                search parameters?

                                ^!Find "a-z0-9".* SBH

                                I understand the SBH part. But I am having difficulty figuring out
                                the scope of the added "period" & "*". Is this creating a wild-card
                                search, and if so, what extra parameter is being added to the search
                                besides the a-z & 0-9...??? I ask because my testing so far with
                                this "Gem" has been flawless, but until I understand this line
                                completely, I won't be able to say it IS flawless... 8-)

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

                                2) Is the Loop command simply a modified IF/THEN/GOTO command...??

                                There is *very* little information about this command in NTP's help
                                file. Actually, NO mention of Loop except for how to get out of one!
                                ;)

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

                                THANX again for your patience & insight.




                                Nothin' Left To Do But...
                                SMILE
                                SMILE
                                SMILE
                                :)
                              • Claes Gauffin
                                Hi Sky-Surfer ... That does not seem quite right. What you should have is a regular expression like this: ^!Find [a-z0-9].* SBHRI which says: search
                                Message 15 of 22 , Nov 3, 1999
                                • 0 Attachment
                                  Hi Sky-Surfer

                                  At 15:01 1999-11-03 -0500, you wrote:

                                  >
                                  >1) Can either of you help explain the depth of the following
                                  >search parameters?
                                  >
                                  >^!Find "a-z0-9".* SBH
                                  >

                                  That does not seem quite right. What you should have is a regular expression
                                  like this:
                                  ^!Find "[a-z0-9].*" SBHRI

                                  which says: search silently, backwards, within the current selection, using
                                  regular expression syntax, ignoring case, for any character between a-z or
                                  0-9,
                                  followed by any number of any character.

                                  Actually, for your purposes I don't think you need the .* part. As soon as
                                  you find one letter or number you know this is a line that should not be
                                  deleted. Also, as you may have gathered from the talk Jody and I had,
                                  backward searching does not work with regular expressions, yet. (We are a
                                  number of people who quite hope for some polishing of regexps in coming
                                  releases...)

                                  >
                                  >2) Is the Loop command simply a modified IF/THEN/GOTO command...??
                                  >

                                  No. "Loop" in your case is not a command but a label for a position in your
                                  code where you can jump as a result of testing a condition.

                                  In your case
                                  ^!If ^$GetSelection$ = ^%NL% Loop
                                  tests whether what you have selected is a line break.
                                  If it is you will continue executing the clip from the position indicated
                                  by :Loop.
                                  If it is not you will continue with the next command in the clip (^!Find...)

                                  Regards /Claes
                                • Jody
                                  Hi Sky-Surfer, Just saw Claes post come in on autocheck when I was getting ready to reply - will send this anyway... Enjoy!-) ... Great! ... UhOh, is Claes
                                  Message 16 of 22 , Nov 3, 1999
                                  • 0 Attachment
                                    Hi Sky-Surfer,

                                    Just saw Claes' post come in on autocheck when I was getting
                                    ready to reply - will send this anyway... Enjoy!-)

                                    > Well, I think we finally have a winner!!!

                                    Great!

                                    > ^!Find "a-z0-9".* SBH

                                    UhOh, is Claes ever gonna jump on you! ;->

                                    > 1) Can either of you help explain the depth of the following
                                    > search parameters?
                                    >
                                    > ^!Find "a-z0-9".* SBH
                                    >
                                    > I understand the SBH part.

                                    So, you understand "B" in this case stands for "Broke." hahaha!

                                    > But I am having difficulty figuring out the scope of the added
                                    > "period" & "*".

                                    Since I have a hard time still understanding regExp fully I'll save
                                    that for those that do know it!-)

                                    > 2) Is the Loop command simply a modified IF/THEN/GOTO
                                    > command...??

                                    No, "If" sets up a choice to do one of two things. Well, instead
                                    of a discussion, try these out. Also see Eric's Demos in his
                                    SampleCode.clb and Help on ^!If. There are two different
                                    formats. I normally reserve numbers for ^!If and use ^!IfSame,
                                    ^!IfDiff for words, but ^!If can be used for words.

                                    <--- Copy below this line --->
                                    H="Demo Variables 1"
                                    ; 11/03/1999, Sojourner@..., jody
                                    :LoopThis
                                    ^!Set %TheVariable%=^?{Set "TheVariable" to the value of=}
                                    ^!Info TheVariable was set to:^p^p"^%TheVariable%"
                                    ^!Skip Change "TheVariable"?
                                    ^!Goto Clip
                                    ^!Goto LoopThis

                                    :Clip
                                    ^!Clip "If TheVariable"


                                    H="_If TheVariable"
                                    ; 11/03/1999, Continued from "Demo Variables 1"
                                    :Yeppers!
                                    ^!Set %If%=^?{Put in what you set TheVariable to=}
                                    ^!If "^%TheVariable%" = "^%If%" Next Else Oops
                                    ^!Info "TheVariable" equals "If" as seen below:^p^p"^%TheVariable%" = ^%If%
                                    ^!Goto Again

                                    :Oops
                                    ^!Info "^%If%" was not what "TheVariable" was set to!^p^p"TheVariable" is equal to: "^%TheVariable%"

                                    :Again
                                    ^!Skip Try Again?
                                    ^!Goto End
                                    ^!Goto Yeppers!


                                    H="Demo - 1"
                                    ; 11/03/1999, Sojourner@..., jody
                                    ^!Set %YourNumber%=^?[Enter a number. You are looking for the number one=_1|]
                                    ^!If 1 = ^%YourNumber% DoThis else DoThat
                                    ;...blah, blah, blah...
                                    :DoThis
                                    ^!SetWizardTitle ~^$StrFill(" ";40)$ If Demo ^$StrFill(" ";40)$~
                                    ^!Info [L]Variable %YourNumber% was set to 1.^pYou are at the "DoThis" label; 1 = ^%YourNumber%.^p
                                    ^!Goto End

                                    :DoThat
                                    ^!SetWizardTitle ~^$StrFill(" ";75)$ If Demo ^$StrFill(" ";75)$~
                                    ^!Info [L]Variable %YourNumber% was set to ^%YourNumber%, but you were looking for 1.^pYou are at the "DoThat" label because %YourNumber% is not equal 1 to ^%YourNumber%.^p

                                    H="Demo - IfSame"
                                    ; 11/03/1999, Sojourner@..., jody
                                    ^!Set %YourWord%=^?[Enter a word. You are looking for the number NoteTab=_NoteTab|]
                                    ^!IfSame "NoteTab" "^%YourWord%" DoThis else DoThat
                                    ;...blah, blah, blah...
                                    :DoThis
                                    ^!SetWizardTitle ~^$StrFill(" ";40)$ IfSame Demo ^$StrFill(" ";40)$~
                                    ^!Info [L]Variable %YourWord% was set to NoteTab.^pYou are at the "DoThis" label because:^p"NoteTab" is the same as "^%YourWord%."^p
                                    ^!Goto End

                                    :DoThat
                                    ^!SetWizardTitle ~^$StrFill(" ";40)$ IfSame Demo ^$StrFill(" ";40)$~
                                    ^!Info [L]Variable %YourWord% was set to "^%YourWord%."^pYou were looking for NoteTab.^pYou are at the "DoThat" label because:^pNoteTab is _not_ the same as "^%YourWord%."^p

                                    <--- Copy above this line, right --->
                                    <--- click over the Clipbook and --->
                                    <--- choose "Add from Clipboard" --->

                                    > Actually, NO mention of Loop except for how to get out of one!

                                    H=Demo Loop
                                    ; 11/03/1999, Sojourner@..., jody
                                    ^!Set %loopvariable%=^?{How many times do you want to loop?=_3|}
                                    ^!Set %Count%=0; %Orig%=^%loopvariable%

                                    :AnyName
                                    ^!Inc Count
                                    ^!Info [L]%loopvariable% was set to ^%Orig%.^pLoop count is now ^%Count%.
                                    ^!If ^%loopvariable% = ^%Count% End else AnyName

                                    H=Demo - Find Loop
                                    ; 11/03/1999, Sojourner@..., jody
                                    ^!SetClipboard NoteTab Pro, NoteTab PRO, NoteTab Pro, NoteTab Std
                                    ^!Toolbar Paste New
                                    ^!Set %Found%=0

                                    :Loop
                                    ; "blank" was found first pass, search has not started
                                    ^!SetWizardTitle ^$GetSelection$ was found.
                                    ^!SetWizardLabel Search backwards for NoteTab Pro (case sensitive)
                                    ^!Find "^?{Find=NoteTab Pro}" SB
                                    ^!IfError Info
                                    ^!IfCancel Cancel
                                    ^!Inc %Found%
                                    ^!Goto Loop

                                    :Info
                                    ^!Jump 1
                                    ^!Info [L]NoteTab Pro was found ^%Found% times.

                                    :Cancel
                                    ^!Skip Delete test doc?
                                    ^!Goto End
                                    ^!Close Discard

                                    Happy Clip'n!
                                    Jody

                                    http://www.sureword.com/notetab

                                    The NoteTab Clip List...
                                    mailto:Ntb-Clips-Subscribe@...
                                    mailto:Ntb-Clips-UnSubscribe@...
                                  • Jody
                                    Hi Sky-Surfer and Others, This is long and taken from Help via Wayne s Cross Rerference. I won t be posting it again so hold onto it, or better yet, get his
                                    Message 17 of 22 , Nov 3, 1999
                                    • 0 Attachment
                                      Hi Sky-Surfer and Others,

                                      This is long and taken from Help via Wayne's Cross Rerference. I
                                      won't be posting it again so hold onto it, or better yet, get his
                                      Cross Reference and Granny Kay's Intorduction to Clipbook
                                      Progaming. The text below is all one line use Join Lines after
                                      you make is a Clip and start from the ^!Info line. Do the
                                      copy/right click thing and put it above the Demos I just sent.

                                      H=Quick If Reference
                                      ; Kay Roath has a very worthwhile:
                                      ; Intorduction to Clipbook Progaming for $5.00.
                                      ; http://able2find.com/notetabclips.shtml
                                      ; ^!If statements stolen from Wayne's Cross Reference
                                      ; http://landru.i-link-2.net/wayne/notetab.html

                                      ^!SetWizardTitle ~^$StrFill(" ";100)$ IfSame Demo ^$StrFill(" ";100)$~
                                      ^!Info [L]Basically speaking, If comapares two things. If they are the same the NoteTab will go to where you tell it too. If they are different then it goes to the other place you tell it to.^P^P^!If 1 = 1 ThenGoThisLabel esle GoDifferentLabel^P...^P:ThenGoThisLabel^P:GoDifferentLabel^P^PSo, if you set a variable or use something like ^$GetSelection$ for one of the halves of the statement (I ususally put the fixed in the first half looking for the second) ^!If will compare them.^P^P^!If 1 = ^$GetSelection$ ThenGoThisLabel esle GoDifferentLabel^P^PIf the number 2 was selected then NoteTab would go to:^P^P:GoDifferentLabel^P^PIf^P^!If Integer1 <>= Integer2 GoToLabelTrue [ELSE GoToLabelFalse]^P^!If "String1" <>= "String2" GoToLabelTrue [ELSE GoToLabelFalse]^P^PIf the comparison result is true, then jumps to the specified GoToLabelTrue label. If the result is false and the optional ELSE keyword follows the first label name, execution jumps to the specified GoToLabelFalse label; or to the next instruction if the "ELSE" label is not used. If the two values represent numbers then they are compared as numbers, otherwise they are compared as strings. String comparison is case sensitive.^PYou can use the following comparison operators:^P < returns True if left value is smaller than right value^P > returns True if left value is greater than right value^P <> returns True if left value is different from right value^P <= returns True if left value is smaller or equal to right value^P >= returns True if left value is greater or equal to right value^P = returns True if left value is equal to right value^P^PExamples:^PThe following will cause the execution to jump to the label defined as IsTrue:^P^!IF "Apple" <> "Orange" IsTrue ELSE IsFalse^PThe following will cause the execution to jump to the label defined as LabelFalse:^P^!IF 16 < 7 LabelTrue ELSE LabelFalse^P^P^P See topic:^P [Clip Language - Testing Conditions]^P^P See also:^P [:Label]^P [Goto]^P [IfClipExist]^P [IfDiff]^P [IfError]^P [IfFalse]^P [IfFileExist]^P [IfInDateRange]^P [IfInRange]^P [IfPathExist]^P [IfSame]^P [IfTrue]^P [IsAutoIndent]^P [IsClipDoc]^P [IsEmpty]^P [IsFileType]^P [IsFullVersion]^P [IsHtmlDoc]^P [IsLightVersion]^P [IsModified]^P [IsNumber]^P [IsOpen]^P [IsOutlineDoc]^P [IsPasteBoard]^P [IsReadonly]^P [IsUrl]^P [IsWordWrap]^P [Skip]^P [While]^P^P^PIfSame^P^!IfSame "Value1" "Value2" GoToLabelTrue [ELSE GoToLabelFalse]^P^PCompares two string values. The comparison is not case sensitive.^P^PThe following will cause the execution to jump to the label defined as GoToLabelTrue:^P^P ^!IfSame "abc" "ABC" GoToLabelTrue^P^PIfDiff^P^!IfDiff "Value1" "Value2" GoToLabelTrue [ELSE GoToLabelFalse]^P^PCompares two string values. The comparison is not case sensitive.^P^PThe following will cause the execution to skip the next instruction (Skip is a predefined label):^P^P ^!IfDiff "abc" "xyz" Skip^P^PIfTrue^P^!IfTrue Value GoToLabelTrue [ELSE GoToLabelFalse]^P^PIf Value is equal to 1, TRUE, YES, Y, or ON (case insensitive), then jumps to specified label name. Do not use comparison operators with this command; in that case, you should use the ^!If command to do a comparison between two values.^P^PIfTrue^P^!IfTrue Value GoToLabelTrue [ELSE GoToLabelFalse]^P^PIf Value is equal to 1, TRUE, YES, Y, or ON (case insensitive), then jumps to specified label name. Do not use comparison operators with this command; in that case, you should use the ^!If command to do a comparison between two values.^p

                                      c ya,
                                      jody

                                      I can only please one person a day.
                                      Today is obviously not your day.
                                      Tomorrow doesn't look good either. 8?D

                                      http://www.sureword.com/sojourner/
                                    • Manuel
                                      How can I count time, by example: 25-11-99 10:00 25-11-99 10:30 I need to know the time between two dates -- Manuel, from Spain manumail@wanadoo.es
                                      Message 18 of 22 , Nov 26, 1999
                                      • 0 Attachment
                                        How can I count time, by example:

                                        25-11-99 10:00
                                        25-11-99 10:30

                                        I need to know the time between two dates
                                        --
                                        Manuel, from Spain
                                        manumail@...
                                      • Len
                                        Hi Manuel; When Eric updatd his web site he included a clip I had sent to him that adds or subtracts days and times. The address is
                                        Message 19 of 22 , Nov 27, 1999
                                        • 0 Attachment
                                          Hi Manuel;

                                          When Eric updatd his web site he included a clip I had sent to
                                          him that adds or subtracts days and times.
                                          The address is http://www.notetab.com/clipbooks/calcdt2.zip
                                          or by page links
                                          www.notetab.com Libraries | other | Mathematics | calcdt2.zip

                                          You may be able to modify the clip for your specific purposes.

                                          I will expand this to caliculate date/time differences when time
                                          premits, however the clip will be significantly larger and more
                                          complex.

                                          Hope the clip helps, Len

                                          At 07:53 PM 11/26/99 +0100, you wrote:
                                          >How can I count time, by example:
                                          >
                                          >25-11-99 10:00
                                          >25-11-99 10:30
                                          >
                                          >I need to know the time between two dates
                                          >--
                                          >Manuel, from Spain
                                          >manumail@...

                                          Leonard O. Hargrove, Jr.
                                          Avionics Systems Engineer
                                          E-Mail: Len <NoteTabA@...>
                                        • Manuel
                                          LEN ... MANUEL Hi, Len, thanks for the url. -- Manuel, from Spain manumail@wanadoo.es
                                          Message 20 of 22 , Nov 27, 1999
                                          • 0 Attachment
                                            LEN
                                            >When Eric updatd his web site he included a clip I had sent to
                                            >him that adds or subtracts days and times.
                                            >The address is http://www.notetab.com/clipbooks/calcdt2.zip

                                            MANUEL
                                            Hi, Len, thanks for the url.

                                            --
                                            Manuel, from Spain
                                            manumail@...
                                          Your message has been successfully submitted and would be delivered to recipients shortly.