Helium scripts are written in C#. If you are familiar with C# and the .NET Framework you will notice that you have access to most features and APIs that are available in a regular console application.


A script contains at least two files, one file with metadata that's used to describe the script, the entry point of the script and additional files that are included with the script.

The file should be in JSON format and named <scriptfile>.json.


The contents of the JSON file looks like this:

   

{
"ScriptName": "The visual name, shown in menues",
"Description": "The full description of the script, shown in the Run script dialog when the script is selected.",
"EntryPoint": "firstscriptfiletoexecute.cs",
"AdditionalFiles": null,
"Author": "The name of the person which created the script",
"Scope": "A text describing which input the script expects, e.g. selected tracks, all artists etc."
}

  The two first fields are self explanatory, the field EntryPoint should point to the file containing the definition below.

AdditionalFiles describes additional files (separate classes etc.) which the script depends on.

 


Here is a basic template for how an empty script should look like:

    

using NeonScripting;

namespace Neon
{
public class Script
{
public bool Run(INeonScriptHost host)
{
// insert your own script code here

return true;
}
}
}

The using NeonScripting directive is needed for accessing all Helium specific features in your script.

The namespace, class and Run methods are all part of the basic template and will need to be there in order to make the script execute.

The INeonScriptHost interface is where the interaction between Neon and your script will happen.


Getting started

A good way to get started with scripting is to check the contents of the scripts shipped with Helium.

These scripts uses the most available tasks and gives a good picture of how to use the functions in an easy way.


Helium looks for scripts in the following directory:

%APPDATA%\Imploded Software\Helium <VERSION>\scripts

Just replace <VERSION> with your specific Helium version.