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

Re: [Clip] Re: Search disk clip command

Expand Messages
  • Axel Berger
    ... Yes, that s certainly passible. Possibly it is being an old-timer from the the time when RAM was at a premium, but those huge variables or arrays never
    Message 1 of 9 , Jul 17, 2012
    • 0 Attachment
      vanwasdi wrote:
      > Then I can let the clip do the searching on the open docs, place
      > the filenames with the searched word in a variable and (after doing
      > all the files) make one html-file from all the found files with
      > the found words highlighted.

      Yes, that's certainly passible. Possibly it is being an old-timer from
      the the time when RAM was at a premium, but those huge variables or
      arrays never feel right to me. I prefer writing auxiliary files. Here's
      how I've done a similar job:

      ---------------------------------------------------------------
      ; long line begins
      ^!Set %tmpf%="^$ExpandEnv("%temp%")$\00A.CSV"; %sstr%=^?{Search string:}
      ; long line ends
      ^!DeleteFile ^%tmpf%
      ^!Jump TEXT_START
      :loop
      ^!Find "^%sstr%" STI
      ^!IfError finis
      ^!Select LINE
      ^!AppendToFile "^%tmpf%" ^$GetSelection$
      ^!Goto loop
      :finis
      ^!Open "^%tmpf%"
      ---------------------------------------------------------------

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