It is run using the following syntax:
MenuX SCRIPTDIR
The Script Syntax/reference guide can be found here:
Spoiler
DEF <varname> <value>-defines or sets the var to that value
SET <varname> <value>
-sets the var to that value
API <dir>
-loads an API, APIs can override any of the area blocks.
DEL <varname>
-deletes the variable
PRS <name>
-runs the defined function
RUN <name> <variable>
-runs the program using shell.run()
RUNLN <line>
-runs that single line of code
DO <code>
-runs that defined bit of code
IF <vars to check> DO <code>
-if all the vars are equals to each other the code is run.
IFNOT <vars to check> DO <code>
-if none of the vars are equal to each other the code is run.
WHILE <vars to check> DO <code>
-while all of the vars are equal it loops the code
WHILENOT <vars to check> DO <code>
-while none of the vars are equal it loops the code
FOR <start> <end> <step> <code>
-for start to end, increasing by step, the code is run.
TABLE <CMD>
LEN <table> <var>
-sets the variable to the length of the table
SET <table> <index> <value>
-sets the value of the table at the index to the value indicated
GET <table> <index> <var>
-sets the var to the value at the index of the table indicated
EVENT <CMD>
TYPE <varname>
-sets the variable to the type of event
VAR <varname> <n>
-sets the variable to the nth event parameter
MATH <varname> <equation>
-sets the variable to the result of the equation
ART <CMD>
BACKGROUND <color> <x> <y>
-sets background of that x,y to the defined color
TEXT <color> <x> <y>
-sets text of that x,y to the defined color
COLOR (or COLOUR) <varname> <color>
-sets the varname to integer value of color
GET <varname> <x> <y>
-sets the varname to the color found at the x,y
-only works for colors set inside the script
TERM <CMD>
PRINT <value>
-prints that value on the screen
SIZE <w> <h>
-sets x and y to the width and height of the terminal
RESTORE
-restores the terminal (term.restore())
CLEARLN
-clears the line the cursor is currently on
BLINK
-toggles blinking
GETBLINK <varname>
-sets the varname to true/false depending on if blink is on/off
SCROLL <n>
-essentially term.scroll(n)
REDNET <CMD>
OPEN <side>
-opens that side of the computer
CLOSE <side>
-closes that side of the computer
ANC <side>
-effectivley rednet.announce()
SEND <id> <message>
-effectivley rednet.send(id, message)
CAST <message>
-effectivley rednet.broadcast(message)
RECIEVE <timeout> <table>
-effecivley rednet.recieve(), the returned vars are turned in to a table and table is set to that table.
WRITE <value>
-writes that value on the screen
SET <x> <y>
-sets the cursor to that position on the screen
SLEEP <t>
-sleeps for that amount of time
TIMER <t>
-starts a timer with t as the interval
STOP
-stops the program running
CLEAR
-clears the terminal
COMP <CMD>
TEXT <varname>
-sets the variable to the containing text of the component
TYPE <varname>
-sets the variable to the type of component
X <varname>
-sets the variable to the X of the component
Y <varname>
-sets the variable to the Y of the component
WIDTH <varname> (or W <varname>)
-sets the variable to the width of the component
HEIGHT <varname> (or H <varname>)
-sets the variable to the height of the component
SET <COMP CMD> <value>
-use above for comp commands, sets that value to the set value.
SETFUNC <name> <code>
-creates a new function called the set name contianing the code
STRING <CMD>
CONCAT <varname> <values>
-joins all of the values together and sets the variable to the result
CUT <varname> <value> <start> <end>
-effectivley string.sub(), should be self explanatory.
RPL <varname> <value> <from> <to>
-effectivley string.gsub(), should be self explanatory
SPLIT <varname> <value> <splitat>
-sets the variable to the split version of the value
ISPLIT <varname> <value> <splitat> <index>
-sets the variable to the index of ths split version of the value
IO <CMD>
CREATE <dir>
-creates a file at the directory
DELETE <dir>
-deletes a file at the directory
OPEN <dir> <type> <name>
-opens the file for use later on, type: write/read.
CLOSE <file>
-closes the file, file is the name set at OPEN
WRITE <file> <line>
-writes the line in the file
READ <file> <varname>
-the variable is set to the new line if it is not nil, it is set to false if it is nil
READF <file> <varname>
-the variable is set to a table containing every line of the file
* <name>
-starts a code block, * on it's own line will end the code block.
Variable rules:
Strings: "value"
Integer: #value
Boolean: %t/true/y/yes/f/false/n/no
Table: <value|value|value|value>
Variable: $varname
Code blocks:
* codename
<code>
*
Area blocks:
::
<area type>
<area code>
::
Area types:
start - run on startup
end - run on end
update - run every update
event - run every event
func:~:name - creates a function
comp - creates a component
Commenting out lines:
start it with ## to comment one line
#: on its own lines starts a comment block
:# on its own line ends a comment block
COMPONENTS DON'T WORK PROPERLY YET!
Update on events; every single event, even any custom or new ones, should work with a maximum of 3 arguments/parameters!
Area types:
start - run on startup
end - run on end
update - run every update
event - run every event
func:~:name - creates a function
comp - creates a component
Commenting out lines:
start it with ## to comment one line
#: on its own lines starts a comment block
:# on its own line ends a comment block
COMPONENTS DON'T WORK PROPERLY YET!
An example script can be found here:
MenuX can be found here:
Bidex Notepad++ syntax can be found here:
Please feel free to post any suggestions, to either the program or the scripting language, also post any criticisms or support you wish to tell me!
Thanks!
(Sorry this post was rushed, I will be creating and posting a tutorial for Slimebol soon and inproving upon suggestions…)