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

Re: Creating a clip that highlights one line at a time from a list

Expand Messages
  • Sheri
    ... Hi Jeff, Hopefully you can adapt these clips to your purpose. Regards, Sheri H= ProcessList ... ^!Toolbar New Document Line One Line Two Line Three ^!Set
    Message 1 of 2 , Sep 24, 2008
      --- In ntb-clips@yahoogroups.com, "Jeff Scism" <jeff@...> wrote:
      >
      > OK, I know this should be done with an array, (and a loop) but I
      > am having troubles finding archived posts which describe how to
      > set up an array that is parsed one line at a time for processing.
      >
      > I need to process a list, which highlights one line at a time,
      > runs ^!Clip on that line, and the returns for the next line until
      > the list is empty. (The clip cuts the highlighted line to a NEW
      > DOC, after reformatting it.)

      > Thanks!
      >
      > Jeff
      >

      Hi Jeff,

      Hopefully you can adapt these clips to your purpose.

      Regards,
      Sheri

      H="ProcessList"
      :CreateList
      ^!Toolbar New Document
      Line One
      Line Two
      Line Three
      ^!Set %listdoc%=^$GetDocIndex$
      ^!Jump Doc_Start
      ^!Set %i%=0
      :RunList
      ^!SetDocIndex ^%listdoc%
      ^!Inc %i%
      ^!If ^%i%>^$GetTextLineCount$ Out
      ^!Clip "doitem"
      ^!Goto RunList
      :Out
      ^!Jump Doc_Start
      ;end of clip


      H="doitem"
      ^!If ^$GetlineSize(^%i%)$=0 End
      ^!Jump ^%i%
      ^!Select EOL
      ;begin long line
      ^!Set
      %alteredname%="^$GetDocReplaceAll("(?<first>\w+)\x20(?<last>\w+)";"$<last>_$<first>")$"
      ;end long line
      ^!Set %alteredname%="^$StrLower("^%alteredname%")$"
      ^!Info ^%alteredname%
      ;end of clip
    Your message has been successfully submitted and would be delivered to recipients shortly.