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

[Clip] Re: How to copy and paste a line without activating ^* ?

Expand Messages
  • joy8388608
    ... ^$GetLine$ translates ^* also but is worse than SelectLine GetSelection since GetLine does NOT return the CRLF and the other way does. I just tried to
    Message 1 of 21 , Nov 8, 2010
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
      >
      > joy8388608 wrote:
      > > I have a clip that searches for a string and copies each line
      > > containing that string to a new doc.
      >
      > Have you tried ^$GetLine$? (I must admit I have not.) If it is the whole
      > line you want anyway this will also simplify your find string.
      >
      > Axel
      >

      ^$GetLine$ translates ^* also but is worse than SelectLine\GetSelection since GetLine does NOT return the CRLF and the other way does.

      I just tried to replace all ^* with ^xxxx* but the REPLACE command also translates the ^*. Even ^%CARET%* gets translated!!!

      Oh well. This has been interesting and something to remember, but it's not important enough (at least to me) to spend more time on.

      But thanks for trying!

      Joy
    • John Shotsky
      You need to use an escape character to process these characters. Replace ^ * with xxxx works just fine. Regards, John
      Message 2 of 21 , Nov 8, 2010
      • 0 Attachment
        You need to use an escape character to process these characters.

        Replace \^\* with xxxx works just fine.

        Regards,
        John
        <http://recipetoolz.com/> http://recipetoolz.com

        From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of joy8388608
        Sent: Monday, November 08, 2010 10:14
        To: ntb-clips@yahoogroups.com
        Subject: [Clip] Re: How to copy and paste a line without activating ^* ?




        --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , Axel Berger <Axel-Berger@...> wrote:
        >
        > joy8388608 wrote:
        > > I have a clip that searches for a string and copies each line
        > > containing that string to a new doc.
        >
        > Have you tried ^$GetLine$? (I must admit I have not.) If it is the whole
        > line you want anyway this will also simplify your find string.
        >
        > Axel
        >

        ^$GetLine$ translates ^* also but is worse than SelectLine\GetSelection since GetLine does NOT return the CRLF and the
        other way does.

        I just tried to replace all ^* with ^xxxx* but the REPLACE command also translates the ^*. Even ^%CARET%* gets
        translated!!!

        Oh well. This has been interesting and something to remember, but it's not important enough (at least to me) to spend
        more time on.

        But thanks for trying!

        Joy



        [Non-text portions of this message have been removed]
      • abairheart
        You ll have to make more of an effort to read the replies to your posts, if you actually WANT help. The problem is the caret, not the asterisk. So search and
        Message 3 of 21 , Nov 9, 2010
        • 0 Attachment
          You'll have to make more of an effort to read the replies to your posts, if you actually WANT help.

          The problem is the caret, not the asterisk.
          So search and replace ONLY the caret, then restore it when done.




          --- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@...> wrote:
          >
          >
          >
          > --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@> wrote:
          > >
          > > joy8388608 wrote:
          > > > I have a clip that searches for a string and copies each line
          > > > containing that string to a new doc.
          > >
          > > Have you tried ^$GetLine$? (I must admit I have not.) If it is the whole
          > > line you want anyway this will also simplify your find string.
          > >
          > > Axel
          > >
          >
          > ^$GetLine$ translates ^* also but is worse than SelectLine\GetSelection since GetLine does NOT return the CRLF and the other way does.
          >
          > I just tried to replace all ^* with ^xxxx* but the REPLACE command also translates the ^*. Even ^%CARET%* gets translated!!!
          >
          > Oh well. This has been interesting and something to remember, but it's not important enough (at least to me) to spend more time on.
          >
          > But thanks for trying!
          >
          > Joy
          >
        • hsavage
          ... posts, if you actually WANT help. ... Joy, airhead s, As indicated in this email the only character causing the problem is the caret, the lines below,
          Message 4 of 21 , Nov 9, 2010
          • 0 Attachment
            airhead's wrote:
            > You'll have to make more of an effort to read the replies to your
            posts, if you actually WANT help.
            >
            > The problem is the caret, not the asterisk.
            > So search and replace ONLY the caret, then restore it when done.


            Joy, airhead's,

            As indicated in this email the only character causing the problem is
            the caret, the lines below, properly placed in your clip, should
            solve your problem.

            I have clips, in use for some time, for this same problem and this
            should take care or it.


            H="change carets"
            ;_sample substitution characters - ¥¤§«¢¿?
            ;_
            ;_This assumes you will not be
            ;_saving the sourcefile after all
            ;_search operations are completed.
            ;_
            ^!Replace "^%caret%" >> "¿?" TWHSA
            ;_
            ;_place this line in your clip where
            ;_it only operates on SOURCE file.
            ;_add above line at beginning of
            ;_clip to replace all carets in
            ;_SOURCE before doing search.
            ;_SOURCE file must be focused.
            ;_¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
            ;_to restore any/all carets in DEST
            ;_
            ^!Replace "¿?" >> "^%caret%" TWHSA
            ;_
            ;_place this line where it operates only
            ;_on DEST after each PASTE operation.

            Use whatever special characters you choose to swap with caret. I
            find them using the Windows C:\WINDOWS\system32\charmap.exe utility.

            ·············································
            ºvº SL_day# 313 - created 2010.11.09_18.48.33

            Rules guys wish girls knew...
            • Yes and No are perfectly acceptable answers.

            € hrs € hsavage € pobox € com
          • flo.gehrke
            ... ^$GetSelection$ is prevented from interpreting that ^** token if the search is being executed with a RegEx. Given a line like... ^***line Combined with
            Message 5 of 21 , Nov 10, 2010
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@...> wrote:
              >
              > Sorry, but you misunderstand.
              > I have a clip that searches for a string and copies each line
              > containing that string to a new doc.

              ^$GetSelection$ is prevented from interpreting that ^** token if the search is being executed with a RegEx.

              Given a line like...

              ^***line

              Combined with diodeom's trick (deleting the leading caret and inserting it later) the whole job could be...

              ^!Jump 1
              ^!Find "\^\Q***\Eline" RS
              ^!SetClipboard ^$StrDeleteLeft(^$GetSelection$;1)$
              ^!Toolbar New Document
              ^!InsertCode ^^$GetClipboard$

              Regards,
              Flo
            • flo.gehrke
              ... Sorry, that s nonsense ;-) The RegEx is just a solution for executing ^!Find without interpreting ^** as a NT-token. It s diodeom s trick which prevents
              Message 6 of 21 , Nov 10, 2010
              • 0 Attachment
                --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
                >
                > ^$GetSelection$ is prevented from interpreting that ^** token if the
                > search is being executed with a RegEx.

                Sorry, that's nonsense ;-)

                The RegEx is just a solution for executing ^!Find without interpreting ^** as a NT-token. It's diodeom's trick which prevents ^$GetSelection$ from interpreting that token.

                Nevertheless, that it's the whole clip that might contribute to Joy's problem...

                Flo
              Your message has been successfully submitted and would be delivered to recipients shortly.