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

RE: [Clip] Note from a tired newbie

Expand Messages
  • Gavin Jolly
    Another newbie, well lets share. This is the clip I built to list all the Image tags in every HTML file within a directory. Enjoy Gavin Jolly gavin@isp.co.nz
    Message 1 of 17 , Aug 28, 2000
    • 0 Attachment
      Another newbie, well lets share.

      This is the clip I built to list all the Image tags in every HTML file
      within a directory. Enjoy

      Gavin Jolly
      gavin@...



      H="List Images"
      ;Prompt user with Clip wizard to determine which directory should be
      searched.
      ^!Set %Directory%=^?{(T=D)Directory to search HTM* documents for Image Tags}

      ^!SetHintInfo Getting image names...
      ^!SetScreenUpdate Off

      ;Create a new document. Save the following line for possible future update
      ^!ToolBar New Document

      ;Turn word wrap off
      ^!SetWordWrap OFF

      ;Retrieve first image name that matches specified search criteria
      ^!Set %FileFullName%=^$GetFileFirst(^%Directory%;"*.htm*";Name)$

      :StartLoop
      ;If the File name is empty (no more matching files), leave the loop
      ^!IfTrue ^$IsEmpty(^%FileFullName%)$ ExitLoop

      ;Open file
      ^!OpenReadOnly ^%FileFullName%
      ^!Jump Doc_Start

      ^!set %FileList%=""

      :Loop
      ^!Find "<IMG SRC=" IS
      ^!IfError Close
      ^!MoveCursor +2
      ^!Set %Link%=^$GetQuoteBlock$
      ^!Append %FileList%=^%FileFullName%,^%Link%^%nl%
      ^!Goto Loop
      :Close

      ^!Document Prev
      ^!insertText ^%FileList%

      ;Get next matching HTM* file name and go back to start of loop
      ^!close ^%FileFullName%
      ^!Set %FileFullName%=^$GetFileNext$
      ^!GoTo StartLoop

      :ExitLoop
      ;Close the file-find variable to restore system resources
      ^!CloseFileFind

      ;Place cursor back to top of page
      ^!Jump Text_Start
    Your message has been successfully submitted and would be delivered to recipients shortly.