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

Re: [Clip] duplicate text

Expand Messages
  • 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 1 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.