Notepad++ Automation Plugin (NppScripts)

This Notepad++ plugin requires .NET v4.0 or higher. 

Total downloads via Notepad++ Plugin Manager: Total Downloads Count            
Downloads Statistics

Project home

The plugin allows automating Notepad++ with scripts written in C#. The automation scripts syntax is ECMA complaint C#. 

Every automation script can be considered as a mini-plugin on its own with all associated plugin attributes: toolbar icon, shortcut, menu item. Thus NppScripts is an automation runtime for convenient development and hosting of the light weight Notepad++ plugins, without dealing with the Notepad++ Plugin SDK infrastructure (or even the compilation). 

Such scripted plugins can be as simple as 'editor-macros' or as complicated as full scale plugins with the docking panels and comprehensive business logic (see the documentation for details).    

NppScripts comes with an intensive library of sample scripts for practically all possible use-cases. While plugin is self-sufficient it is highly recommended to use it in conjunction with Notepad++ C# Intellisense plugin (available from Notepad++ Plugin Manager).


Simple script, which opens the current Notepad++ document Windows Explorer. It also puts the button with the "Open Folder" icon (Shell32.dll index 3) on the Notepad++ toolbar. 

//npp_toolbar_image Shell32.dll|3 
using System;
using NppScripts;
using System.Diagnostics;
 
public class Script : NppScript
{
    public override void Run()
    {
        string path;
        Win32.SendMessage(Npp.NppHandle, NppMsg.NPPM_GETFULLCURRENTPATH, 0, out path);
        Process.Start("explorer.exe""/select," + path);
    }
}


 Plugin's Script Manager Panel

Last edited Feb 8 at 12:53 AM by oleg_s, version 18