Discuss Scratch

dvargasews
Scratcher
500+ posts

How to get Scratch Code into Scratch Projects

I'm working o a project that includes giving the name of an isotope based on its proton and neutron count. I figured out how to make the code, and I'm using lists for the elements, but I don't want to have to add each individually in Scratch, because there are 118 (and I'm doing name and atomic symbol, so that would be 236 in total), but I copied the table from Wikipedia, pasted them into Microsoft Excel, copied each column that I need from Microsoft Excel, pasted it into the scratchblocks testing page, then copied them from there and pasted them into Google Docs, and then copied them from there and pasted them into Microsoft Word. (I needed to use the find and replace function in Microsoft Word because it accepted enters, but I had to use third parties to get in into the formatting that I wanted it in.) I used the find and replace function on Microsoft Word to get the coding that I needed, and then copied and pasted the lists into Google Docs, and from there into the testing page. Now, all I need to do is get the code into the actual Scratch project, which I figured would be easy because I thought that I saw a link for a convertor on the wiki, but it turns out that it was something else, and this is for a grade, so please help me.


I didn't want to risk lagging up the browser, so here are the links:
one script
the other script
awesome-llama
Scratcher
1000+ posts

How to get Scratch Code into Scratch Projects

You could paste the code into the JSON file (which comes in the project file download).

Download your project, rename the extension .sb2 to .zip, and open the zip file. In there is images of costumes, and a project.json file.
Move it out of the .zip file and edit the json file with a text editor such as notepad++.

Paste the blocks in, save. Move to the file back, rename to sb2 and upload the project.
dvargasews
Scratcher
500+ posts

How to get Scratch Code into Scratch Projects

awesome-llama wrote:

You could paste the code into the JSON file (which comes in the project file download).

Download your project, rename the extension .sb2 to .zip, and open the zip file. In there is images of costumes, and a project.json file.
Move it out of the .zip file and edit the json file with a text editor such as notepad++.

Paste the blocks in, save. Move to the file back, rename to sb2 and upload the project.
Thanks; I got it to work, and it really helped!

I'll close this topic now.

Powered by DjangoBB