Hey guys, quick question, I was wondering if any advanced programmer would be will to create a GUI to create [-scratchblock-] codes, like scratch, it would click together, and you could convert it to text, this would be very useful.
I mainly need this because I can help people with codes, but I can't use scratchblocks correctly
.
Thanks
Dan
Offline
Hi Dan,
This looks like honestly much more work than it's worth. There is, however, a really cool cheat in Scratch. Open up Scratch, write your script, then shift-click the file menu and select Write Project Summary. Then choose a file path. Open up the shiny new txt file you get, and you'll see a section with your script in a format pretty close to scratchblocks format to work relatively right. You can of course tweak it afterwards.
Here's a sample summary-generated code you can see:
when green flag clicked
forever
if ((x position) < (y position)) else
reset timer
else
turn 15 degrees
end
when green flag clicked
forever
if ((x position) < (y position)) else
reset timer
else
turn 15 degrees
end
As you can see, it's not perfect, but it gets you started. And it's just plain really cool in a way. Enjoy!
Last edited by Hardmath123 (2012-07-21 08:56:13)
Offline
You're welcome. I ought to put this up on the Wiki.
Offline
There's a script included with Kurt that exports all the scripts (and images) in a project to scratchblocks format. Just point it at a Scratch project file (.sb), and it does exactly this for you
Offline
I am also working an a Scratch plugin that automatically gives you scratchblocks code when you select an option from right clicking a script. Stay tuned in a couple weeks for more updates
Offline
daniel_j wrote:
Thanks guys
The plugin would be awesome
![]()
The plugin has been made
See http://scratch.mit.edu/forums/viewtopic.php?id=102175
Offline