Creating scripts

To create a script or JavaScript file, go to the plugin's script folder (plugins/OpenJS/scripts), create a .js file (e.g., file.js), and start coding. I recommend using a code editor like Notepad++ or Visual Studio Code. Make sure your script is loaded and enabled, if you're not sure how to check this, refer to the available commands section.

As the file type suggests, scripts are written in JavaScript (specifically ECMAScript 6.0) While this version of JavaScript is somewhat outdated, it's very simple and easy to use.

Here’s an example script that will log 'Hello World!' to your console:

HelloWorld.js
log.info("Hello World!")

Additional notes:

Last updated