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

17406Re: Need help converting a list of files to links

Expand Messages
  • Pat Drummond
    Feb 5, 2008
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
      >
      > --- In ntb-clips@yahoogroups.com, "Pat Drummond" <pat@> wrote:
      > >
      > > I've had to convert a long list of files into links several times,
      > > line by line (using clip: <a href="^?[URL=^&]">^?[URL]</a>) ...
      >
      > Is it that you wanted this?
      > <a href="xxx.html">xxx.html</a>
      >
      > If so you could add these lines to Jody's clip just after the line
      > containing: ^?{Enter link name}
      >
      > ^!IfFalse ^%Prompt% Next else Skip_2
      > ^!MoveCursor -4
      > ^%GetSelect%
      >
      > Regards,
      > Sheri

      Yes, exactly what I need. Thank you! With some courage I edited the
      clip further so it simply converts a list of filenames to links
      without prompts. Feel free to edit and add it to a library for others
      to use. Jody lives and Sheri rocks!

      Format List to links
      ; "Format Bare link" Last updated by Jody 11-27-2000
      ; Last updated by Sheri, Pat D. 02-05-2008
      ^!Jump 1
      ^!SetHintInfo Wrapping links...
      ^!SetScreenUpdate Off
      ^!SetWordWrap Off
      ^!Jump Doc_End

      :Loop1
      ^!IfFalse ^$IsEmpty(^$GetLine$)$ Skip_2
      ^!Replace "^p" >> "" SB
      ^!Goto Loop1
      ^!InsertText ^p
      ^!Jump 1

      :Loop2
      ^!Select Eol
      ^!Set %GetSelect%=^$GetSelection$
      ; put ^& in link name if you want the link there
      <a href="^&"></a>
      ^!MoveCursor -4
      ^%GetSelect%
      ^!Jump +1
      ^!If ^$GetRow$ = ^$GetLineCount$ Skip
      ^!Goto Loop2
      ^!Jump 1
      ^!SetWordWrap On
    • Show all 9 messages in this topic