Community
    • Login

    how to show line in hex

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 1.5k Views
    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.
    • Tim RoachT
      Tim Roach
      last edited by

      how do I show a ansi line in hex?

      andrecool-68A 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by PeterJones

        There isn’t a builtin way to do that. There may be a plugin, though I don’t know which one off the top of my head. EDIT: wait, if you have 32-bit Notepad++, you can use TextFX, which had that feature builtin.

        However, my Jun 12 post in another thread shows a script that you can run with the PythonScript plugin in order to show the hex value of the active character.

        Or there are plenty of command-line utilities you can download from the internet, which you could run on the current file by doing Run > Run… cmd /c c:\path\to\util.exe "$(FULL_CURRENT_PATH)" & pause, or from inside one of the automation plugins like NppExec, you could actually capture the output of the script and paste it overtop of the active document contents. It would have a similar logic to the following NppExec script, but calling a different executable:

        cls
        cmd.exe /c exit %RANDOM%							// cannot access $(SYS.RANDOM) directly through NppExec, but can tell cmd.exe to return it as a value
        set tempfile = $(SYS.TEMP)\NppGpgFile_$(EXITCODE).tmp				// create random tempfile name
        set ascfile = $(SYS.TEMP)\NppGpgFile_$(EXITCODE).asc				// create associated ascfile name
        sci_sendmsg SCI_SELECTALL							// select all
        sel_saveto $(ascfile) :a							// save selection to the ascfile	(use :a to save as ansi, to prevent unicode prefix ÿþ getting embedded)
        gpg.exe --output "$(tempfile)" --decrypt "$(ascfile)"				// decrypt
        sel_loadfrom $(tempfile)							// replace selection with results
        sci_sendmsg SCI_DOCUMENTSTART						// deselect
        rm -rf "$(tempfile)" "$(ascfile)"						// cleanup temp files
        npp_save
        
        1 Reply Last reply Reply Quote 1
        • andrecool-68A
          andrecool-68 @Tim Roach
          last edited by

          @Tim-Roach Maybe I didn’t understand everything … maybe like this:

          Imgur

          PeterJonesP 1 Reply Last reply Reply Quote 4
          • PeterJonesP
            PeterJones @andrecool-68
            last edited by

            @andrecool-68 ,

            Oh, right, I forgot that the Converter plugin came with the ASCII->HEX command. Since Plugins > Converter comes by default with Notepad++, that’s definitely the best solution.

            1 Reply Last reply Reply Quote 4
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors