Hi all, I've spent several hours today pouring through pages of posts and trying several different scripts to add the Import Block feature to Scratch...and I can't get it to work. I get to opening up the Workspace, pasting in the code, then selecting the 'File It In' menu item...and nothing happens, no prompt, Scratch doesn't quit, no menu add...all I can seem to do it either save the file from the Workspace or quit the program...I just don't know where I'm going wrong. I'd LOVE to be able to import all of the hundreds/dozens of blocks I see in the library, but I'm feeling just a little undereducated in using Scratch to get this done.
Could someone point me to the latest/best method for importing blocks into Scratch and/or a video showing how to set this up? Thanks so much, I know this is a very basic question in this forum, but I truly am struggling after a good deal of time trying every implementation method I could find in the forums. :-)
Offline
Not sure if this is the problem, but before you file it in, you need highlight the text.
Offline
I've got it selected (highlited in green on my screen), but whenever I navigate to the 'File It In' the text loses focus and seems to lose the highlight, I've tried keeping my cursor over the text in the workspace to keep it highlighted and to navigate to the menu item using keyboard, but can't seem to do that or figure out another way...blergh. Feeeling pretty newbie right now.
Offline
This isn't really a basic question, I myself never really got a nice, clean import. Do you want a user-friendly menu, or do you want to add the code yourself?
Offline
Hardmath123 wrote:
This isn't really a basic question, I myself never really got a nice, clean import. Do you want a user-friendly menu, or do you want to add the code yourself?
Frankly, I'd be happy either way. I'd been pursuing the menu as I figured that would be the best way in the long run, but you raise a good point that focusing on simply adding in the blocks myself more manually might be the more robust way. I'll scan the forums for how to handle that, give it a shot, then cry for help again if needed. :-)
Offline
Great, good luck. If you still need help, check out http://scratch.mit.edu/forums/viewtopic.php?id=31200. To add the menu, you'll need to talk to the Scratcher dreamod.
Offline
Well, no luck so far. I followed the links and read through everything I could. I certainly understand using the browser to find the block specs and can copy/paste the block spec for the block I want and then save it...but then when I switch over to 'instance' I can't seem to copy/paste the code into any of the files I find, and when I paste the code into a new Workspace I can find the option to save to a file...but don't know where and suspect this is not what I should be doing. It would be nice for people not familiar with Squeak/Scratch class hierarchy and environment to have a video by someone showing how to install custom blocks. :-(
Help. :-) I'm trying to get some of the blocks implemented that would help my 9 year old complete here game which is I why I won't quit until I figure this out.
Offline
Alright, I'll help you out.
Open up the Browser, and navigate to Scratch-Objects > ScriptableScratchMorph > (class button) > block specs > blockSpecs
I assume you know how to add a blockspec, so moving on to the code:
Navigate to Scratch-Objects > ScriptableScratchMorph > (instance button) > other ops. Then look at the coding pane. There's a sample method highlighted in green. Replace it with the block's actual code.
Whenever you change something, remember to alt-click on the coding pane and select "accept".
Enjoy!
Offline
By the way, we're you saving the image and then re-opening Scratch when filing in those patches? Menus and most other interface objects don't appear until you tell them to -- which is what saving the image does
Offline
Hardmath123 wrote:
Alright, I'll help you out.
Open up the Browser, and navigate to Scratch-Objects > ScriptableScratchMorph > (class button) > block specs > blockSpecs
I assume you know how to add a blockspec, so moving on to the code:
Navigate to Scratch-Objects > ScriptableScratchMorph > (instance button) > other ops. Then look at the coding pane. There's a sample method highlighted in green. Replace it with the block's actual code.
Whenever you change something, remember to alt-click on the coding pane and select "accept".
Enjoy!![]()
WONDERFUL! It works flawlessly. When I have time later today I'm going to create a YouTube video for other people like me who need a little extra help getting this far. Thanks so much.
Offline
brockgs wrote:
Hardmath123 wrote:
Alright, I'll help you out.
Open up the Browser, and navigate to Scratch-Objects > ScriptableScratchMorph > (class button) > block specs > blockSpecs
I assume you know how to add a blockspec, so moving on to the code:
Navigate to Scratch-Objects > ScriptableScratchMorph > (instance button) > other ops. Then look at the coding pane. There's a sample method highlighted in green. Replace it with the block's actual code.
Whenever you change something, remember to alt-click on the coding pane and select "accept".
Enjoy!![]()
WONDERFUL! It works flawlessly. When I have time later today I'm going to create a YouTube video for other people like me who need a little extra help getting this far. Thanks so much.
That's great, I'm glad I could help.
Offline