Community
    • Login

    Scripts: Creating & Editing

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 6 Posters 26.4k 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.
    • jamminjamesJ
      jamminjames
      last edited by

      I’m confused about creating and editing Notepad scripts: is that functionality built in, or do you have to install a plugin? If a plugin, are there more than one scripting plugins to choose from?

      I need to create a script that will modify a text file by searching for text and replacing.

      1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by

        There are at least three scripting plugins I know about:

        • NppExec – a scripting language similar to windows batch files, more suitable for running external applications (like compilers), but with the npp_sendmsg and sci_sendmsg commands (which send commands to the underlying NPP or Scintilla objects), which could be used to automate Notepad++'s builtin search & replace
        • PythonScript – uses a full copy of Python 2.7 to automate Notepad++, and has a detailed help-file that explains the wrappers around most of the NPP/Scintilla messages.
          • as someone who hasn’t done any official Python programming, but knows multiple other languages, I have been able to pick up enough (thru the help-file, and some googles on Python syntax) to write some PythonScripts to automate NPP
          • as far as I know, hasn’t been released for 64bit NPP, so you have to stay with
          • it’s safer to install via the direct download MSI (linked above) rather than through the PluginManager (some users have reported problems when installing via PluginManager)
        • LuaScript Plugin – uses the Lua language
          • I’ve never used it, but its author @dail is active on these forums
          • digging into the repo, LuaScript 0.7.1 appears to embed Lua 5.3.4, if I am reading things correctly
          • It’s available for both 32bit and 64bit Notepad++
          • I believe it installs just fine thru Plugin Manager

        If anyone knows of other scripting plugins, feel free to chime in.

        Also, if anyone knows whether there will ever be a 64bit PythonScript (ie, whether the author is ever going to do another update, or whether someone else is trying to get permission, so they can take it over and update it), that’d be great news. (My PythonScripts that automate some of my more common tasks are currently the only major thing holding me back from switching to 64bit. If that doesn’t move forward, I may have to try a few Lua tutorials, and try to convert my PythonScripts to LuaScripts.)

        Claudia FrankC 1 Reply Last reply Reply Quote 5
        • Claudia FrankC
          Claudia Frank @PeterJones
          last edited by

          @PeterJones

          first step done but still some way to go ~300 Warnings needs to be solved.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 5
          • SuncatcherS
            Suncatcher
            last edited by

            Cool!
            It would be nice to see ever some scripting functionality built-in, i.e. without the need to install any plugins.

            1 Reply Last reply Reply Quote 0
            • MAPJe71M
              MAPJe71
              last edited by

              jN Notepad++ Plugin - uses the JavaScript language and is available for both 32 and 64 bit Notepad++.

              1 Reply Last reply Reply Quote 1
              • Herb MartinH
                Herb Martin
                last edited by

                What would be really neat and perhaps the most effective is a PowerShell plug-in to embed the entire language.

                1 Reply Last reply Reply Quote 0
                • MAPJe71M
                  MAPJe71
                  last edited by

                  CS-Script plugin - uses C#-script language and is available for both 32 and 64 bit Notepad++.

                  1 Reply Last reply Reply Quote 1
                  • mkupperM mkupper referenced this topic on
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors