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

[Clip] Re: title varible

Expand Messages
  • Sheri
    ... I posted a correction. the line: ^!MoveCursor ^%GetRow%:0 should be: ^!SetCursor ^%GetRow%:1 Using ^$GetDocMatchAll can t possibly do what you want, it
    Message 1 of 12 , Oct 9, 2009
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, tom thomas <tom@...> wrote:
      >
      > This does the same as my clip
      >
      > ^!If ^$GetSelSize$=0 Next Else Skip_2
      > ^!MoveCursor ^%GetRow%:0
      > ^!Select EOL
      > ^!Set %mod%=^$GetDocMatchAll("[!\x20.,?]+";"")$
      > ^!Jump Select_Start
      > ^!InsertText ^%mod%^%NL%
      > ^!ClearVariable %mod%
      > ;end of clip
      >
      > The original is not there.
      >
      > And NoteTab Pro 5.1
      >
      > Thanks,
      > Tom

      I posted a correction.

      the line:
      ^!MoveCursor ^%GetRow%:0
      should be:
      ^!SetCursor ^%GetRow%:1

      Using ^$GetDocMatchAll can't possibly do what you want, it would produce a string separated by semicolons of the runs of exclamation points, etc. The clip would insert that string with a line break in front of the selection.

      ^$GetDocReplaceAll was introduced in version 5.7.

      Current NoteTab version is 6.12. It should be a free update from 5.1.

      There have been many improvements and bug fixes since 5.1.

      Regards,
      Sheri
    • flo.gehrke
      ... Tom, I think Sheri gave you a perfect solution -- if run with the latest version. Here s another idea that possibly works with v5.1. Regarding your
      Message 2 of 12 , Oct 9, 2009
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, tom thomas <tom@...> wrote:
        >
        > I get an error for this line
        >
        > ^!Set %mod%=^$GetDocReplaceAll("[!\x20.,?]+";"")$

        Tom,

        I think Sheri gave you a perfect solution -- if run with the latest version. Here's another idea that possibly works with v5.1.

        Regarding your ^!Replace commands: Combining H and W makes no sense. Either it's W (whole document) or H (highlighted text only). In this case, I think you mean H.

        Line #5 in your clip removes spaces. But I understand they must not be removed from the original titel.

        The following clip will turn any line like...

        This, is. my? title!

        into...

        Thisismytitle
        This is my title


        ^!IfEmpty ^$GetSelection$ Next Else Skip_2
        ^!Info There's nothing selected!
        ^!Goto End
        ; Remove punctuation marks but no spaces
        ^!Replace "[[:punct:]]" >> "" HARS
        ; Remove spaces from selection
        ^!SetClipboard ^$StrReplace(" ";"";^$GetSelection$;0;0)$
        ^!Jump Line_Start
        ^!InsertText ^$GetClipboard$^P


        Regards,
        Flo
      • tom thomas
        Yes, you are right. I created a new clip from yours, but I think I click my old one by mistake, thinking it was yours. Tom
        Message 3 of 12 , Oct 9, 2009
        • 0 Attachment
          Yes, you are right. I created a new clip from yours, but I think I
          click my old one by mistake, thinking it was yours.

          Tom

          At 06:52 PM 10/9/2009, you wrote:
          >
          >
          >
          >
          >--- In
          ><mailto:ntb-clips%40yahoogroups.com>ntb-clips@yahoogroups.com, tom
          >thomas <tom@...> wrote:
          > >
          > > This does the same as my clip
          > >
          > > ^!If ^$GetSelSize$=0 Next Else Skip_2
          > > ^!MoveCursor ^%GetRow%:0
          > > ^!Select EOL
          > > ^!Set %mod%=^$GetDocMatchAll("[!\x20.,?]+";"")$
          > > ^!Jump Select_Start
          > > ^!InsertText ^%mod%^%NL%
          > > ^!ClearVariable %mod%
          > > ;end of clip
          > >
          > > The original is not there.
          > >
          > > And NoteTab Pro 5.1
          > >
          > > Thanks,
          > > Tom
          >
          >I posted a correction.
          >
          >the line:
          >^!MoveCursor ^%GetRow%:0
          >should be:
          >^!SetCursor ^%GetRow%:1
          >
          >Using ^$GetDocMatchAll can't possibly do what you want, it would
          >produce a string separated by semicolons of the runs of exclamation
          >points, etc. The clip would insert that string with a line break in
          >front of the selection.
          >
          >^$GetDocReplaceAll was introduced in version 5.7.
          >
          >Current NoteTab version is 6.12. It should be a free update from 5.1.
          >
          >There have been many improvements and bug fixes since 5.1.
          >
          >Regards,
          >Sheri
          >
          >
        • tom thomas
          I upgraded, no errors, but still does not work This This Is My Title Becomes this ; ; This Is My Title Clip code: ^!If ^$GetSelSize$=0 Next Else Skip_2
          Message 4 of 12 , Oct 9, 2009
          • 0 Attachment
            I upgraded, no errors, but still does not work

            This

            This Is My Title

            Becomes this

            ; ;
            This Is My Title


            Clip code:

            ^!If ^$GetSelSize$=0 Next Else Skip_2
            ^!SetCursor ^%GetRow%:1
            ^!Select EOL
            ^!Set %mod%=^$GetDocMatchAll("[!\x20.,?]+";"")$
            ^!Jump Select_Start
            ^!InsertText ^%mod%^%NL%
            ^!ClearVariable %mod%
            ;end of clip

            Thanks,
            Tom Thomas

            At 06:52 PM 10/9/2009, you wrote:
            >
            >
            >
            >
            >--- In
            ><mailto:ntb-clips%40yahoogroups.com>ntb-clips@yahoogroups.com, tom
            >thomas <tom@...> wrote:
            > >
            > > This does the same as my clip
            > >
            > > ^!If ^$GetSelSize$=0 Next Else Skip_2
            > > ^!MoveCursor ^%GetRow%:0
            > > ^!Select EOL
            > > ^!Set %mod%=^$GetDocMatchAll("[!\x20.,?]+";"")$
            > > ^!Jump Select_Start
            > > ^!InsertText ^%mod%^%NL%
            > > ^!ClearVariable %mod%
            > > ;end of clip
            > >
            > > The original is not there.
            > >
            > > And NoteTab Pro 5.1
            > >
            > > Thanks,
            > > Tom
            >
            >I posted a correction.
            >
            >the line:
            >^!MoveCursor ^%GetRow%:0
            >should be:
            >^!SetCursor ^%GetRow%:1
            >
            >Using ^$GetDocMatchAll can't possibly do what you want, it would
            >produce a string separated by semicolons of the runs of exclamation
            >points, etc. The clip would insert that string with a line break in
            >front of the selection.
            >
            >^$GetDocReplaceAll was introduced in version 5.7.
            >
            >Current NoteTab version is 6.12. It should be a free update from 5.1.
            >
            >There have been many improvements and bug fixes since 5.1.
            >
            >Regards,
            >Sheri
            >
            >
          • tom thomas
            Silly me, I copied from my own email message instead of yours. Your original clip works ^!If ^$GetSelSize$=0 Next Else Skip_2 ^!SetCursor ^$GetRow$:1 ^!Select
            Message 5 of 12 , Oct 9, 2009
            • 0 Attachment
              Silly me, I copied from my own email message instead of yours. Your
              original clip works

              ^!If ^$GetSelSize$=0 Next Else Skip_2
              ^!SetCursor ^$GetRow$:1
              ^!Select EOL
              ^!Set %mod%=^$GetDocReplaceAll("[!\x20.,?]+";"")$
              ^!Jump Select_Start
              ^!InsertText ^%mod%^%NL%
              ^!ClearVariable %mod%
              ^!Goto End
              ;end of clip

              Results

              ThisIsMyTitle
              This Is My Title


              That's what I want.

              Thanks,
              Tom Thomas


              At 06:52 PM 10/9/2009, you wrote:
              >
              >
              >
              >
              >--- In
              ><mailto:ntb-clips%40yahoogroups.com>ntb-clips@yahoogroups.com, tom
              >thomas <tom@...> wrote:
              > >
              > > This does the same as my clip
              > >
              > > ^!If ^$GetSelSize$=0 Next Else Skip_2
              > > ^!MoveCursor ^%GetRow%:0
              > > ^!Select EOL
              > > ^!Set %mod%=^$GetDocMatchAll("[!\x20.,?]+";"")$
              > > ^!Jump Select_Start
              > > ^!InsertText ^%mod%^%NL%
              > > ^!ClearVariable %mod%
              > > ;end of clip
              > >
              > > The original is not there.
              > >
              > > And NoteTab Pro 5.1
              > >
              > > Thanks,
              > > Tom
              >
              >I posted a correction.
              >
              >the line:
              >^!MoveCursor ^%GetRow%:0
              >should be:
              >^!SetCursor ^%GetRow%:1
              >
              >Using ^$GetDocMatchAll can't possibly do what you want, it would
              >produce a string separated by semicolons of the runs of exclamation
              >points, etc. The clip would insert that string with a line break in
              >front of the selection.
              >
              >^$GetDocReplaceAll was introduced in version 5.7.
              >
              >Current NoteTab version is 6.12. It should be a free update from 5.1.
              >
              >There have been many improvements and bug fixes since 5.1.
              >
              >Regards,
              >Sheri
              >
              >
            • Sheri
              ... Great, glad you got it! ... I see I had again typed it with percents instead of dollar signs. Sorry about that. ^!Jump Line_Start would have been a better
              Message 6 of 12 , Oct 10, 2009
              • 0 Attachment
                --- In ntb-clips@yahoogroups.com, tom thomas <tom@...> wrote:
                >
                > Silly me, I copied from my own email message instead of yours. Your
                > original clip works
                >
                > ^!If ^$GetSelSize$=0 Next Else Skip_2
                > ^!SetCursor ^$GetRow$:1
                > ^!Select EOL
                > ^!Set %mod%=^$GetDocReplaceAll("[!\x20.,?]+";"")$
                > ^!Jump Select_Start
                > ^!InsertText ^%mod%^%NL%
                > ^!ClearVariable %mod%
                > ^!Goto End
                > ;end of clip
                >
                > Results
                >
                > ThisIsMyTitle
                > This Is My Title
                >
                >
                > That's what I want.
                >
                > Thanks,
                > Tom Thomas

                Great, glad you got it!

                > >
                > >I posted a correction.
                > >
                > >the line:
                > >^!MoveCursor ^%GetRow%:0
                > >should be:
                > >^!SetCursor ^%GetRow%:1


                I see I had again typed it with percents instead of dollar signs. Sorry about that.

                ^!Jump Line_Start

                would have been a better way to do that.

                Regards,
                Sheri
              Your message has been successfully submitted and would be delivered to recipients shortly.