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:
log.info("Hello World!")
Additional notes:
You can use AIs like ChatGPT to help you create scripts. There's a basic documentation written specifically for AIs, so they understand how OpenJS works. Just copy the text from there and send it to the AI, it will know what to do.
Last updated