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

[Clip] Link to specific line

Expand Messages
  • Claes Gauffin
    Hi all In the following clip I want to create a number of links to a target document. The syntax for those links is, according to Help: [docname::nnn^L]
    Message 1 of 2 , Mar 31, 1999
    • 0 Attachment
      Hi all

      In the following clip I want to create a number of links
      to a target document. The syntax for those links is, according
      to Help:

      [docname::nnn^L] where nnn is the desired line number.

      The problem is that when I insert these links into a hit list,
      the "^L" for some reason is resolved into a CR/LF.

      Is there any way to enter the line number indicator into my list of
      links?

      Regards /Claes

      ;---------------------------
      ;Search a (presumably large) text file for a specified string
      ;and create a list with all hits.
      ;Each hit is displayed with the three lines preceeding,
      ;containing and following the hit, plus a link.

      ^!Set %ext%=^$GetExt("^##")$
      ^!IfFalse ^$IsModified$ IsSaved
      ^!Continue ^$GetName("^##")$ must be saved. OK to do it?
      ^!save
      :IsSaved
      ^!IfFalse ^$IsWordWrap$ Skip
      ^!Keyboard CTRL+W
      ^!Jump DOC_START
      ^!set %string%=^?{Search string};%case%=^?{Case sensitive==Yes^=""|_No^=I}
      ^!Find "^%string%" WTS^%case%
      ^!IfError NoHit
      ^!Set %Save%=SEARCH RESULT FOR "^%string%" IN
      "^$GetName("^##")$^$GetExt("^##")$"^%NL%^%NL%
      :Search
      ^!Set %Data2%= > ^$GetLine(-1)$^%NL%
      ^!Set %Data3%= > ^$GetLine$^%NL%
      ^!Set %Data4%= > ^$GetLine(+1)$^%NL%
      ^!Set %Data5%=Link: [^##::^$GetRow$^L]^%NL%^%NL%
      ^!Append %Save%=^%Data1%^%Data2%^%Data3%^%Data4%^%Data5%
      ^!Find "^%string%" TS^%case%
      ^!IfError Done
      ^!GoTo Search
      :Done
      ^!Toolbar New Document
      ^!InsertText ^%Save%
      ^!IfFalse ^$IsWordWrap$ Skip
      ^!Keyboard CTRL+W
      ^!GoTo Exit
      :NoHit
      ^!Prompt Cannot find "^%string%
      ;---------------------

      ------------------------------------------------------------------------
      eGroup home: http://www.eGroups.com/list/ntb-clips
      Free Web-based e-mail groups by eGroups.com
    Your message has been successfully submitted and would be delivered to recipients shortly.