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

Re: [Clip] Re: Problems with "Remove Between Two Values"

Expand Messages
  • Alan C.
    Hi Buzap, I saw some great help/ideas for you there from Sheri and Hugo. I haven t noticed that you posted back yet. Sometime it only take me a few minutes to
    Message 1 of 4 , Jan 24, 2003
      Hi Buzap,

      I saw some great help/ideas for you there from Sheri and Hugo.

      I haven't noticed that you posted back yet.

      Sometime it only take me a few minutes to write a clip because I already understand what I do versus it take me longer to understand what someone else up to unless they include very descriptive line by line psuedo code so as to represent exactly what they want out of each of their lines of code as well as their intended purpose for each label section of their clip.

      the next I tested and it works good. use it, or not, either all or portion(s), up to you. its 2 labeled sections that are only differentiated by a 1 versus a 0 -- one of them yet needs to insert a line break whilst the other yet needs to delete a blank line--minor things rather easily 2 be remedied.

      H="RmvBtwValus"
      ^!Set %firstvalue%="ddd"
      ^!Set %secondvalue%="jjj"
      ; ^!Set %firstvalue%="<!-- begin -->"
      ; ^!Set %secondvalue%="<!-- end -->"

      ; ***CHOOSE: 1=keep first/second values, 0=remove them too
      ^!Set %keep%=1

      ^!Jump 1
      ; init or initialize section ends here
      :postinit
      ^!Find "^%firstvalue%" IS
      ^!IfError end
      ^!IfSame "^%keep%" "1" keep1st2nd_1

      :keep1st2nd_0
      ; 0=remove them too
      ^!Set %1stval%=^$GetRow$:^$GetColStart$
      ^!Find "^%secondvalue%" IS
      ^!Set %2ndval%=^$GetRow$:^$GetColEnd$
      ^!Goto proceed2del

      :keep1st2nd_1
      ; 1=keep first/second values
      ^!Set %1stval%=^$GetRow$:^$GetColEnd$
      ^!Find "^%secondvalue%" IS
      ^!Set %2ndval%=^$GetRow$:^$GetColStart$

      :proceed2del
      ^!SetCursor ^%1stval%
      ^!SelectTo ^%2ndval%
      ^!Continue Delete selection & proceed?
      ^!Replace "^$GetSelection$" >> "^%EMPTY%" IS
      ^!Goto postinit
      ; ---end of clip---

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