ScratchLang is a non-visual programming language written in Python and Shell based on Scratch. You can contribute on the Github Repository.
If you are a Windows user, install MSYS2.
Install Dependencies (list below)
Clone the repo:
Start the project with
If you have a ScratchLang command, start the project with
If you want to test out the decompiler, run python3 scratchlang.py -4
and select the .sb3 every-block-+-pen.sb3 which is in the resources
folder. You get to see it decompile all
the blocks added so far.
To code, edit the .ss(es) in ScratchLang's editor, which you can run
with
To add assets, put them in the assets folder
for the chosen sprite (or stage)
You
don't need ScratchLang to program ScratchScript (.ss) files, you can use a text editor. You just
need ScratchLang to compile your project so it can run in Scratch.
To check the stable
blocks, just decompile the
every-block-+-pen.sb3 which is in the resources folder.
You will get an unknown block error for blocks that the decompiler can't read yet.
Every other block is most likely a stable block
Mac and Chrome OS can run ScratchLang. Just find a way to install Python onto it. (For Chrome OS, you're going to have to enable the developer linux terminal.)
Assign something to a variable.
Add "num" to a variable.
Show a variable.
Hide a variable.
Add an item to a list.
Remove item "num" from a list.
Delete all items from a list.
Insert an item into index "num" of a list.
Replace element "num" of a list with something else.
Returns item "num" from a list.
Returns the index of an item from a list.
Returns the amount of elements in a list.
Returns true if a list contains an item, else false.
Show a list on the stage
Hide a list on the stage
Waits "num" seconds.
Repeats the code inside the curly braces "num" times.
Executes everything inside the braces forever.
Runs code inside the braces if <INPUT> is true.
Runs code inside the braces if
<INPUT>
is true, and runs the code under the else
braces if
<INPUT>
is false.
Waits until <INPUT>
is true.
Repeats the loop until <INPUT>
is true.
Repeats the loop until <INPUT>
is NOT true.
Repeats "num" times while also increasing the variable.
Stops something depending on the value in the brackets. "all" can be replaced with "this script" or "other scripts in sprite".
Script runs when sprite is cloned.
Create a clone of "sprite".
Delete the clone.
This section probably won't be written soon.
The repository is owned, maintained, and programmed by 0K9090 and other contributors.
This site is developed and maintained by Stan-Solov and 0K9090.
None of this would be possible without the amazing
people at MIT, who created the Scratch programming site.
ScratchLang is developed by the ScratchLang
Organization under the MIT license.