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

duplicate text

Expand Messages
  • awfkiwhistler
    Given the script between the lines and the text below that, if I select test of the and run the script I get !testtest !ofof !thethe (on three lines just
    Message 1 of 2 , Oct 4, 2004
    • 0 Attachment
      Given the script between the lines and the text below that, if I
      select "test of the" and run the script I get "!testtest !ofof
      !thethe" (on three lines just like it started). I version confused as
      to where the duplicate text is coming from. I had this working once
      upon a time but I wrote it a year ago, don't clipbook often, and lost
      it do to a drive failure. Knowing you did it before but not being able
      to figure it out a second time is maddening. Thanks for any assistance.
      =======================
      ^!Set %SelStart%=^$GetRowStart$
      ^!Set %SelEnd%=^$GetRowEnd$
      ^!Jump ^%SelStart%
      :InsertComment
      ;Returns a string composed of SubStr inserted at position Index in Str.
      ^$StrInsert(!;^$GetLine$;0)$
      ^!Jump +1
      ^!If ^$GetRow$ <> ^%SelEnd% InsertComment
      =======================
      this
      is
      a
      test
      of
      the
      emergency
      comment
      system
    • Jody
      Hi awfkiwhistler, ... I think you just want to comment each line. If so, this should do it. Don t select the last CR/LF in the lines. ^!Set
      Message 2 of 2 , Oct 4, 2004
      • 0 Attachment
        Hi awfkiwhistler,

        >Given the script between the lines and the text below that, if I
        >select "test of the" and run the script I get "!testtest !ofof
        >!thethe" (on three lines just like it started).

        I think you just want to comment each line. If so, this should do
        it. Don't select the last CR/LF in the lines.

        ^!Set %SelStart%=^$GetRowStart$
        ^!Set %SelEnd%=^$GetRowEnd$
        ^!Jump ^%SelStart%
        :InsertComment
        ;Returns a string composed of SubStr inserted at position Index in Str.
        ^!Select Line
        ^$StrInsert(!;^$GetLine$;0)$^%nl%
        ^!If ^$GetRow$ <> ^%SelEnd% InsertComment

        or, select the last CR/LF:

        ^!Set %SelStart%=^$GetRowStart$
        ^!Set %SelEnd%=^$GetRowEnd$
        ^!Jump ^%SelStart%
        :InsertComment
        ;Returns a string composed of SubStr inserted at position Index in Str.
        ^!Select eol
        ^$StrInsert(!;^$GetLine$;0)$
        ^!jump +1
        ^!If ^$GetRow$ <> ^%SelEnd% InsertComment

        >=======================
        >^!Set %SelStart%=^$GetRowStart$
        >^!Set %SelEnd%=^$GetRowEnd$
        >^!Jump ^%SelStart%
        >:InsertComment
        >;Returns a string composed of SubStr inserted at position Index in Str.
        >^$StrInsert(!;^$GetLine$;0)$
        >^!Jump +1
        >^!If ^$GetRow$ <> ^%SelEnd% InsertComment
        >=======================
        >this
        >is
        >a
        >test
        >of
        >the
        >emergency
        >comment
        >system
      Your message has been successfully submitted and would be delivered to recipients shortly.