Skip to content
This repository was archived by the owner on Dec 8, 2024. It is now read-only.

How does it work?

Sectonidse edited this page Oct 17, 2023 · 10 revisions

Variables to know

receiver - a list variable that has all the input and separates each word. noCmdReceiver - a str variable that has all the words except the first one and it is NOT a list. Useful in some cases. usrvars - a dict variable that has user variables added by the SCL "var" command. plilibs - a list variable that has all the python libraries added by the SCL "py install" command curPath - a str variable, current working path of SCL. dFileInsides - a str variable, has all the lines of script drag-n-dropped into SCL, "SCLipt" cmds - a dict variable containing all the help for commander() commands.

At first, there was a commander().

Commander is a def that contains all the commands. Here's one of them.

image This is the command that simply outputs what you wrote without the first word. Simple thing, but may be useful for SCLipts...

Yes, i know that i could have used match case, but it was too late for me to learn about it (I'll reconstruct the code later).


Commander checks if receiver[0] for the actual commands, if it has one then the command is executed, else it'll print image

After the command is done, it'll execute the aftermath() def if it's not in the script mode (if SCLipt was drag-n-dropped into SCL). To stop the loop and quit the SCL, simply type stop.

And then there's aftermath().

aftermath() is a def that processes the input and calls the commander() to execute some commands. It modifies receiver and noCmdReceiver variables.


First thing that it does is that it asks the user for the input, saved to receiver, which is then would have each word splited into the list.

Startup

At first, SCL loads libraries for the code and executes aftermath().


More detailed page soon.

To understand the code behind SCL, please read "How does it work".

Clone this wiki locally