Community
    • Login

    Make list of names clickable?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    listclickable
    3 Posts 2 Posters 4.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • GreeberetG Offline
      Greeberet
      last edited by

      Hi i have a list of about 100 names in .txt file,it is possible to make them clickable?

      so if i click a name it open the corresponding txt file with the same name on a new tab?
      try to search but all i get is html hyperlink, and i don’t want to open the browser,just a new tab on notepad++

      1 Reply Last reply Reply Quote 0
      • guy038G Offline
        guy038
        last edited by guy038

        Hello Greeberet,

        Well, the problem can be split into two smaller ones :

        • Firstly, define the right form of an hyperlink to a file

        • Secondly, open this file, in a new tab, from inside Notepad++


        1)

        Let’s suppose, we have a file, named Abc.txt in the directory C:\Tools\Tests. Then the right form of a Notepad++ hyperlink, to that file, is, simply :

        file:///C:/Tools/Tests/Abc.txt
        

        Just notice, that you must insert the string file:/// before the absolute path of the file, and change any backslash, found in the path, by a regular slash

        If the path and/or the name of your file contains any character from the list below, you must change it with the corresponding %nn hexadecimal syntax

        SPACE    ->    %20
          !      ->    %21
          $      ->    %24
          '      ->    %27
          ;      ->    %3b
          [      ->    %5b
          ]      ->    %5d
          ^      ->    %5e
          `      ->    %60
          {      ->    %7b
          }      ->    %7d
          ~      ->    %7e
        

        Moreover, any character with ANSI code between \x80 and \xff, and, especially, all accentuated characters, will be changed in their appropriate %nn syntax !

        For instance, if the name of your file is ©'Final' chapter [of my book].txt, the hyperlink should be, for the same directory than above, :

        file:///C:/Tools/Tests/%a9%27Final%27%20chapter%20%5bof%20my%20book%5d.txt
        

        2)

        Suppose that all your files, to be opened, in N++, via hyperlinks, have a specific extension : Let’s say .prg. Then, you just have to associate this new extension to Notepad++. To do so :

        • Choose the Menu option Settings - Preferences - File Association

        • Select the customize entry and type your specific extension .prg

        • Click on the -> button to register this extension, for N++

        • Close the Preferences dialog

        => Now, supposing that we still use the path above, each time you double-click, in any file, inside N++, on the hyperlink, below, the corresponding file My file.prg is, automatically, opened in a new tab of N++ !

        file:///C:/Tools/Tests/My%20file.prg
        

        Note :

        I didn’t test with a known extension ( like .txt, .ini, .vb or else ) but it should work, too ! ( Just choose the language or type first, then the wanted extension and click on the -> button )

        Best Regards

        guy038

        GreeberetG 1 Reply Last reply Reply Quote 1
        • GreeberetG Offline
          Greeberet @guy038
          last edited by

          @guy038 Thankyou ,that worked!

          Anyway to hide the skeleton code?

          sorry been trying to reply with proper code block for the past 2 hours but can’t,keep getting:
          Post content was flagged as spam by Akismet.com

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors