Just curious: Why not Windows Scripting Host?

Andreas M.
  • Andreas M.

    Andreas M. - 2012-01-23

    Out of curiosity, I would be interested why Python was chosen as scripting backen and not the Windows Script Host, which also would have allowed for Python scripting (as well as PHP, ooREXX, Javascript, Lua, Perl, VBScript, etc.). Are there any serious complications, when supporting the Windows Script Host? If the editor would become a component itself (in addition to be able to call them), it could be called externally from applications and scripts to do text-processing.

  • Dave Brotherstone

    Python was chosen because it's The Best Scripting Language There Is ™ :) 

    To be honest, I didn't know WSH could do "real" languages, although with the number of issues that are reported on the 'net about it (several options that mean it Just Doesn't Work), some of which I've experienced, I'm not sure it would have been the right decision anyway.  Happy to be proven wrong if you've got details/links how it can be integrated.

    The Python integration works very neatly, and most of the Scintilla (editor) methods are generated code, which means we get a complete interface to scintilla. 

    Personally I find Python the perfect fit for a built-in script language - in that it can do big structured things with objects and the like, but equally well a simple linear list of commands, without any syntatic-babble wrapped around it.

    There's also the PHP plugin (PHP Automation), and the Javascript plugin if you prefer those languages.  They've obviously got a different interface, and a different API to notepad++.

  • Eugen Kremer

    Eugen Kremer - 2012-02-05

    There is a scripting Plugin based on WSH (jN). It allows you to start MS Office Applications and communicate with it. You can provide a reference of jN.Editor object to VBA and control N++ from it. To do it import Typelibrary from jN.dll in MS Office Application Macros Editor and enjoy intellisense support.