SparkScript Documentaion(READ THE WHOLE THING, SCROLL DOWN!)

To use sps(SparkScript) you have to have a IDE, preffered VSCODE.

You must paste the interpreter path into the console where it says "interpreter path:" after you run it.

Then paste your .sps file path into the cmd it opens.

.sps Syntax:

sPrint(' ') To print something to the console *MUST HAVE SINGLE QUOTES*.

Most statements(keyword most, not all) will start with (spark.).

Statements consists of:

Spark.sVar var name = var value To set a variable a value and name(var names must be single letters at the moment!).

Spark.sPrintvar(var name) This prints the value of a variable to the console.

spark.sPrintvarT(varname) prints the variable type, numbers 0-25 are considered type "number", anything else is just considered "else"

spark.mathF is the math class of which the result of ONLY SQRT(every other operation the vars stay the same) is automatically assigned to a variable(IF YOU PASSED THROUGH A VAR, YOU CAN JUST USE NORMAL NUMBERS TOO!).

spark.mathF consists of:

spark.mathF.addition(num or var+num or var) This adds together the 2 numbers, or variables you passed through the parens, prints the result.

spark.mathF.mul(num or var*num or var) This multiplies together the 2 numbers, or variables you passed through the parens, prints the result.

spark.mathF.divide(num or var/num or var) This divides the 1st number by the second, or variables you passed through the parens, prints the result.

spark.mathF.subtraction(num or var-num or var) This subtracts the 2nd number from the 1st, or variables you passed through the parens, prints the result.

spark.mathF.sqrt(num or var) This finds the square root of the number you passed through the parens, and if its a variable it automatically replaces the value of it with the result, and prints it to the console.

spark.mathnoreF.sqrt

mathnoreF only has one member, sprt, which it finds the square root of the number or var, but does not replace its value.

mathnoreF stands for math no reassign function.

Functions

Functions can be made and called whenever in your script, but atm they only accept one argument :(.

You can write functions by writing newFunc functionname {whatever sps code you wants to execute}.

You can call these functions by writing call functionname.

Waiting

You can make your script wait before executing the next code line by writing spark.wait(how many seconds to wait).

Creating windows

To create a window write spark.createWindow(window name).

You can add a label to the window by writing spark.newLabel('windowname', 'labeltext', 'fontname', 'fontsize').

You can open the window by writing open windowname.

System fucntions

You can run system commands by wriiting spark.os.command system command to run.

You can get detectm input(only handles one) by writing spark.getIn whatever key to detect, and it will print the key that was pressed to the cmd console

You can open webpages by writing spark.openWeb(Website to open).

Lastly, comments

Lastly, to write comments just write a // before whatever comment you write.