Scripts: Creating & Editing
-
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.
-
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
andsci_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.)
- NppExec – a scripting language similar to windows batch files, more suitable for running external applications (like compilers), but with the
-
first step done but still some way to go ~300 Warnings needs to be solved.
Cheers
Claudia -
Cool!
It would be nice to see ever some scripting functionality built-in, i.e. without the need to install any plugins. -
jN Notepad++ Plugin - uses the JavaScript language and is available for both 32 and 64 bit Notepad++.
-
What would be really neat and perhaps the most effective is a PowerShell plug-in to embed the entire language.
-
CS-Script plugin - uses C#-script language and is available for both 32 and 64 bit Notepad++.
-