Community
    • Login

    extensive macro support required in npp

    Scheduled Pinned Locked Moved General Discussion
    macro writing
    10 Posts 3 Posters 3.8k 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.
    • V S RawatV
      V S Rawat
      last edited by

      npp’s macro writing is cryptic and almost impossible. We can’t write a macro in text, we have to record it. it kills the very purpose of coding.

      so many repetitive things are to be done in npp, but we have to do that manually every time, because simple macro writing is not possible.

      lack of macro support is becoming biggest handicap of npp.

      extensive macro support required.

      Thanks.

      Rawat

      1 Reply Last reply Reply Quote 0
      • dailD
        dail
        last edited by

        npp’s macro writing is cryptic and almost impossible

        It was never created in such a way to be user friendly to create them manually. It was made to record and replay simple actions.

        I would recommend if you need better automated support, try a plugin such as LuaScript or PythonScript to create your set of actions by coding them in an actual scripting language.

        1 Reply Last reply Reply Quote 2
        • V S RawatV
          V S Rawat
          last edited by

          I have downloaded both, shall try them out.

          Thanks for poiting to the right direction.

          1 Reply Last reply Reply Quote 0
          • V S RawatV
            V S Rawat
            last edited by

            btw, has anyone tried using AutoHotKey or AutoIt type of general window based scripting whether they work within an open window of npp++ and can do sequential find/ replace within current tab/ all open tabs?

            Thanks.

            1 Reply Last reply Reply Quote 0
            • V S RawatV
              V S Rawat
              last edited by

              I use foxpro - foxreplace for doing text based sequential replacement.

              but that work “line-based”, doesn’t carry changes “broken across multiple lines”, and that can not combine lines by removing \r\n, as far as I know.

              Whereas, in Npp, I need to look into characters broken across \r\n to do the replacement, so I need some scripting method that can do sequential find/ replace across \r\n.

              Thanks.

              Scott SumnerS 1 Reply Last reply Reply Quote 0
              • Scott SumnerS
                Scott Sumner @V S Rawat
                last edited by

                @V-S-Rawat

                AutoHotKey or AutoIt

                These will work with N++ but the control you get is not as refined as what you get from one of the scripting languages. I used to have some AutoIt automation for Find/Replace that I converted to Pythonscript, and the PS version works much better,’

                broken across multiple lines

                Notepad++ can find across lines using Regular Expression search mode. Without you providing more detail, however, it is hard to advise you on the “scripting” aspect of the searching you want to do…

                1 Reply Last reply Reply Quote 1
                • V S RawatV
                  V S Rawat
                  last edited by

                  is there any “quick start” site for PythonScript scripting,
                  so that I can learn basics there quickly.

                  Also, do they have a repository to share “free to use” scripts developed by users?
                  so that I can take some “multiple phrases replacement” scripts from there and try on my text files.

                  Thanks.

                  Rawat

                  1 Reply Last reply Reply Quote 0
                  • V S RawatV
                    V S Rawat
                    last edited by

                    Mostly I have to do these following repeated replacement in many files.

                    1. I put text to npp files first time
                    2. one set of replacement done at that time, to clean up or structure the text.
                    3. then I do some processing of that text on net/ browser, and bring processed text again to same npp file, overwriting previous one.
                    4. Then second set of replacement done, which is primarily to undo the changes brought in step 2. (previous replacement)

                    though the following list is not really divided in two distinct set, I have just jotted down to give an idea.

                    first column is “find”,
                    second column is “to be replaced with”
                    there is a space in between to demark column, that is not to be used in replacement.
                    whereever “with nul” is there at the end, that describes the find text to be deleted.
                    whereever “space” is written , that space " " is included in “find” or “replaced” text.

                    I mostly work on “extended”, but for some I will have to put regex mode on.
                    and I also want some replacements to be allowed on “selection” only.

                    \r\n,\r\n ,space
                    \r\n;\r\n ;space
                    \r\n(\r\n space(
                    \r\n)\r\n space)
                    #N/A nul

                    \r\n।\r\n ।\r\n
                    \r\nऔर\r\n spaceऔरspace
                    \r\n, और\r\n ,spaceऔरspace
                    \r\n, या\r\n space, याspace
                    \r\nया\r\n spaceयाspace
                    \r\nजैसे कि\r\n spaceजैसे किspace
                    (\r\nउदाहरण के लिए (उदाहरण के लिए,

                    _{2,} two or more with nul
                    Subject’s Signature and Date with nul
                    Signature of the Subject/ Volunteer: with nul
                    Signature of the Volunteer: with nul
                    \t with space
                    (space with (
                    space) with )
                    space/ with /
                    / with /space
                    space{2,} with space
                    space: with :

                    thanks.

                    1 Reply Last reply Reply Quote 0
                    • V S RawatV
                      V S Rawat
                      last edited by

                      of course, I cannot expect you are anyone giving me readymade macros for these,
                      it is just to clarify what type of requirements are there.

                      And the “strange” words/ letters are unicode. (Hindi/ Devanagari)

                      hope that clarifies my problem to a large extent.

                      thanks.

                      1 Reply Last reply Reply Quote 0
                      • V S RawatV
                        V S Rawat
                        last edited by

                        I could understand the basics of pyscript, though not yet developed a macro of my own.

                        it seems, entire foxreplace activity can be done within npp itself, by pythonscript.

                        so convenient.

                        thanks for directing to the right direction.

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