Table of Contents

Creating Tool or Service Script

With scripting possibilities coming withing 1.50 release it is possible to automate a lot of routine task in advanced way (non advanced is using of macros, also available with 1.50).

Supported Scripting Engines

HippoEDIT uses ActiveScripting and because of that supports any installed active scripting engine. By default supported JavaScript and VBScript. If you start any VBS or JS file inside of HippoEDIT with Execute command or as a tool, HE will assume that it is HE script and will try to execute passing scripting objects. So it can work with any *.js or *.vbs file. But for convenience, there are also dedicated schemes inherited from JS and VBS syntaxes and associated with *.hejs and *.hevbs extensions correspondingly. Dedicated schemes extended by HE specific syntax. Till now only HE JS schema is up to date. HE VBS will be updated later.

These resources can be used as starting point for learning scripting languages:

It is also possible to write scripts in other languages if they there is Active Script engine available

Scripting variants

If you think about implementing something with scripting, you have two choices:

Basics

Scripting in HippoEDIT is not very different to any scripting implementation by other applications and very similar to scripts you can run in a web browser (like Internet Explorer, Firefox, Chrome etc). Any script for browser or other application which does not use internal objects exposed by the application itself (like window in browsers) should also run in HippoEDIT. All tricks with objects, inheritance, prototypes, accessing via this should also work.

There are some specialties, which implements HippoEDIT and which make it a little bit different (from functional but not conceptual side) from other scripting hosts (applications which allow scripting of them):

But independently to reach scripting feature set, HippoEDIT provides, writing of scripts is easy. Here is your first hello world application:

hello_world.js
var version_string = "I am running HippoEDIT " + Application.version;
alert("Hello World!\r\n" + version_string );

Copy+Paste the code to new JavaScript document and try with Tools→Execute.

For an easy start with your new script plugin, you can use Service Script Wizard from Scripting Tools plugin

Examples