Discuss Scratch

mbrick2
Scratcher
1000+ posts

How to add scripts through js

^

Last edited by mbrick2 (Feb. 9, 2022 07:06:21)

-EmeraldThunder-
Scratcher
1000+ posts

How to add scripts through js

An sb3 file is basically just a renamed zip file. You could code your script in scratch, download the project, unzip and copy the code out of the json.
Then set a string in node to be this code and programmatically unzip the file you want to append to. Load in the json from the file and append to the blocks field of the sprite. Then programmatically rezip and change the file extension.

Powered by DjangoBB