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

Re: [Clip] deleting duplicate lines

Expand Messages
  • Axel Berger
    ... ^$StrSort( Str ;CaseSensitive;Ascending;RemoveDuplicates)$ (added in v4.52) Returns the specified text Str sorted according to the defined criteria.
    Message 1 of 9 , Nov 3, 2011
      Jean-François Colas wrote:
      > However I can't help for using this setting in clip if you don't want NT
      > to behave that way all the time.

      ^$StrSort("Str";CaseSensitive;Ascending;RemoveDuplicates)$
      (added in v4.52)

      Returns the specified text "Str" sorted according to the defined
      criteria. NoteTab 5 supports two new values for the CaseSensitive
      parameter: ANSI to enforce a case sensitive dictionary-type sorting
      order and False_ANSI to ignore character case during sorting. The ANSI
      option produces a sorting order that matches the result from the
      Modify/Lines/Sort menu command. Note, however, that sorting is much
      slower with the ANSI option.

      For example, the following instruction will sort the lines contained in
      the Clipboard, in ascending order, ignoring character case, and removing
      duplicates:

      Axel

      --
      Dipl.-Ing. F. Axel Berger Tel: +49/ 2174/ 7439 07
      Johann-Häck-Str. 14 Fax: +49/ 2174/ 7439 68
      D-51519 Odenthal-Heide eMail: Axel-Berger@...
      Deutschland (Germany) http://berger-odenthal.de
    • m_frascinella
      Axel, Jean-Francois s tip about View - Options - Tools - Sort Removes Duplicates definitely worked as a manual way to sort and remove duplicate lines. I
      Message 2 of 9 , Nov 3, 2011
        Axel,

        Jean-Francois's tip about View -> Options -> Tools ->Sort Removes Duplicates definitely worked as a manual way to sort and remove duplicate lines.

        I tried the StrSort statement but could not get it to work.

        First of all, the StrSort statement did not turn blue (valid) as with other Notetab statements.

        Second, I was not sure how to grab all the lines I extracted. I tried this thinking that my %Lines% variable was still active.
        ^$StrSort("^%Lines%";False;true;true)$

        That did not work.

        Then I tried:
        ^!Select all
        ^$StrSort("^$GetClipboard$";False;true;true)$

        But this resulted in nothing in the new file but the StrSort statement.

        What is wrong? The StrSort statement does not seem to be working for me.

        Yours,

        Michael F


        --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
        >
        > Jean-François Colas wrote:
        > > However I can't help for using this setting in clip if you don't want NT
        > > to behave that way all the time.
        >
        > ^$StrSort("Str";CaseSensitive;Ascending;RemoveDuplicates)$
        > (added in v4.52)
      • Don
        ^!Select all ^$StrSort( ^$GetSelection$ ;False;true;true)$
        Message 3 of 9 , Nov 3, 2011
          ^!Select all
          ^$StrSort("^$GetSelection$";False;true;true)$

          On 11/3/2011 4:13 PM, m_frascinella wrote:
          > ^!Select all
          > ^$StrSort("^$GetClipboard$";False;true;true)$
        • m_frascinella
          Don, Thanks for the correction. The clip now works perfectly. I am still puzzled as to why the ^$StrSort statement does not turn blue as with other NoteTab
          Message 4 of 9 , Nov 4, 2011
            Don,

            Thanks for the correction. The clip now works perfectly.

            I am still puzzled as to why the ^$StrSort statement does not turn blue as with other NoteTab statements.

            Is there something different about statements that begin with ^$ compared with ^! statements?

            Yours,

            Michael F
            =========


            --- In ntb-clips@yahoogroups.com, Don <don@...> wrote:
            >
            > ^!Select all
            > ^$StrSort("^$GetSelection$";False;true;true)$
            >
            > On 11/3/2011 4:13 PM, m_frascinella wrote:
            > > ^!Select all
            > > ^$StrSort("^$GetClipboard$";False;true;true)$
            >
          • Axel Berger
            ... Yes, ^$ is a function not a command. What Don gave works, but the canonical correct use would have been either ^!Set %variable%=^$function$ or ^!InsertText
            Message 5 of 9 , Nov 4, 2011
              m_frascinella wrote:
              > Is there something different about statements that begin
              > with ^$ compared with ^! statements?

              Yes, ^$ is a function not a command. What Don gave works, but the
              canonical correct use would have been either
              ^!Set %variable%=^$function$
              or
              ^!InsertText ^$function$

              You can omit the ^!InsertText, but you ought not to.

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