Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Macro for ANSI encoding

    Help wanted · · · – – – · · ·
    2
    5
    2550
    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.
    • Nicole Sigaud
      Nicole Sigaud last edited by

      Hello all, I am struggling with this macro - which came out all wrong. I have 200+ text files that I need to import to another software, but it requires the imported to be ANSI. I recorded as follows:
      Ctrl+A
      Ctrl+C
      Convert to ANSI
      Ctrl+V (just in case some characters became crazy)
      Save
      Close
      The macro did not work, and opening the shortcuts.xml file I saw that many commands were not recorded (the ones requiring buttons to be pushed)
      Just for the record, the files are written in Brasilian Portuguese…
      Can anyone please tell me what did I do worng here? Thanks

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @Nicole Sigaud last edited by

        @Nicole-Sigaud

        as you already found out, macro recording sometimes doesn’t record all needed steps.
        If this happens you can use the …\notepad++\localization\english.xml file to find the
        message ids needed and edit shortcuts.xml like this

            <Macro name="Convert to ansi" Ctrl="no" Alt="no" Shift="no" Key="0">
                <Action type="0" message="2013" wParam="0" lParam="0" sParam="" />
                <Action type="0" message="2178" wParam="0" lParam="0" sParam="" />
                <Action type="2" message="0" wParam="45009" lParam="0" sParam=""/>
                <Action type="0" message="2179" wParam="0" lParam="0" sParam="" />
            </Macro>
        

        The message 45009 is doing the conversion, the others were recorded.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Nicole Sigaud
          Nicole Sigaud last edited by

          Thanks a lot, I’m trying this out.

          1 Reply Last reply Reply Quote 0
          • Nicole Sigaud
            Nicole Sigaud last edited by

            Claudia, isn’t it possible to save and close? I still have doubts about the difference between the Action types - is it that type=“2” refers solely to wParam number listed on items id from “english.xml” file?

            Claudia Frank 1 Reply Last reply Reply Quote 0
            • Claudia Frank
              Claudia Frank @Nicole Sigaud last edited by

              @Nicole-Sigaud

              if you edit shorcuts.xml you need to restart npp to make it happen.
              In regards to the different action types you might want to take a look
              here
              .

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors