Hardmath123 wrote:
Better mockup:
That looks good.
It will be post 40. Not much space, unless we put 43 as a reserved post and have fullmoon delete his post. ^^
Offline
scimonster wrote:
Hardmath123 wrote:
Better mockup:
That looks good.
It will be post 40. Not much space, unless we put 43 as a reserved post and have fullmoon delete his post. ^^
I like the fact that there is an image, rather than just a text, but rather than saying, no image, it should have the block as a text.
Offline
Is a busy librarian going to have the time to add a post to the queue? On the other hand it works nicely to stop posts being missed.
someone posts a block, a librarian adds that post to the queue and quotes the post saying "queued". That way people know that their block is in the process of being added even if it seems overlooked. I support!
Since the queue is only really for librarians we don't have to use one of the reserved spaces for it - the queue post could be anywhere as consecutivity isn't a problem.
Offline
As impressive as that would be, why not just make a scratch project with the codes or something just in case, so you can make sure you always have the codes? It would save a lot of trouble with the whole queue thing. And then you could always repost later if it is evident your block was missed.
At any rate, I now have 4 new panther motion blocks, which spawn a sprite along the edges of the stage. I'm working on a block that makes a random edge spawn, but I'm still very new at this. So, enough rambling from me, here they are.
Spawn Left Edge
self gotoX: (-240) y: (self randomFrom: -180 to: 180)
Spawn Right Edge
self gotoX: (240) y: (self randomFrom: -180 to: 180)
Spawn Top Edge
self gotoX: (self randomFrom: -240 to: 240) y: (180)
Spawn Bottom Edge
self gotoX: (self randomFrom: -240 to: 240) y: (-180)
And a bounce block. This one was being stupid when I multiplied it by -1, so I just rotate 180 degrees now. Same effect.
self turnLeft: (180)
Wow, I made a lot of blocks today. Here's another one. It's also a panther block. It is based off of Sparks's lowercase block. I sincerely cannot beleive that changing the code to say uppercase ACTUALLY worked. Oh well. Can't complain.
Title Code
$String$ as uppercase
Script
^ t1 asUppercase
Okay, next day, no one else has posted, and I made another block. This one is falls under looks. It is called "Pause".
self showInformDialog: 'Paused' withText: 'Project paused, click OK to continue.'
Here's another random InformDialog block that allows you to post your name at the beginning of a project. If anyone can adopt this with a string, it would be greatly appreciated, because I can't for the life of me make that work. So here it is the creator info block. The code has to be edited though. Just replace your name here with your username or company.
self showInformDialog: 'Creation' withText: 'This project was created by [your name here.].'
Last edited by metagrosslord (2011-05-14 16:03:01)
Offline
I need people to use the online variable blocks. Due to non-use the site has shut down twice. Please use them.
Offline
YourLocalBlockLib wrote:
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png
^Back to Scratch blocks
How to download a Scratch block
Credit to nXIII for his patcher, which this code was based on
This is a way how you can make an "import block" item in the file menu so you can download and import blocks from the library.
Beware: this feature is untested! If you want to test it for us, great, but don't use this in your production environment yet!
The Importer
Installing the block importer is the hardest (but not very hard) thing you must do in order to import blocks. Simply follow these instructions:
Step 1: Open Scratch
Step 2: Press and hold the "shift" key while clicking the loop of the "R" in the Scratch logo
Step 3: Select "turn fill-screen off" from the popup menu which shows up
Not showing up? Make sure you're clicking inside the loop of the "R"; the "logo" referred to is the one that says "Scratch" in the top-left corner.
Step 4: Click anywhere in the "white space" which shows up at the bottom and right sides of the window
Step 5: Select "open..." from the popup menu
Step 6: Select "workspace" from the subsequent popup menu
Step 7: Copy the following text and paste it into the textbox-like window with (Windows) Alt+V or (Mac) Command+V, or by clicking the "-" button above the scrollbar (appears when the mouse is over the "workspace" window) and selecting "paste (v)"Code:
'From MIT Squeak 0.9.4 (June 1, 2003) [No updates present.] on 18 June 2010 at 5:06:17 pm'! !ScratchFileChooserDialog methodsFor: 'initialization'! createBlockFileChooserFor: t1 scratchFrame _ nil. readingScratchFile _ true. list _ ScratchFilePicker new extensions: #(#block ). self removeAllMorphs. bottomSpacer delete. bottomSpacer _ nil. mainColumn addMorphBack: list. self title: 'Import Block'. list scratchInfoClient: nil. mainColumn addMorphBack: (Morph new extent: 5 @ 9; color: Color transparent); addMorphBack: newTitleBin. fileInfoColumn addMorphBack: buttonRow. self addMorphBack: shortcutColumn; addMorphBack: mainColumn; addMorphBack: fileInfoColumn! ! !ScratchFrameMorph methodsFor: 'menu/button actions'! addBlock | t1 t2 t3 t4 | t1 _ ScratchFileChooserDialog new createBlockFileChooserFor: self; type: #block. t2 _ t1 getUserResponse. t2 = #cancelled ifTrue: [^ self]. t3 _ (FileDirectory forFileName: t2) oldFileNamed: t2. t4 _ t3 contentsOfEntireFile. (ReadWriteStream on: t4 from: 1 to: t4 size) fileIn! ! !ScratchFrameMorph methodsFor: 'menu/button actions'! fileMenu: t1 | t2 | t2 _ CustomMenu new. t2 add: 'New' action: #newScratchProject. t2 add: 'Open' action: #openScratchProject. t2 add: 'Save' action: #saveScratchProjectNoDialog. t2 add: 'Save As' action: #saveScratchProject. t2 addLine. t2 add: 'Import Project' action: #importScratchProject. t2 add: 'Export Sprite' action: #exportSprite. t2 addLine. t2 add: 'Import Block' action: #addBlock. t2 addLine. t2 add: 'Project Notes' action: #editNotes. Sensor shiftPressed ifTrue: [t2 addLine. t2 add: 'Write Project Summary' action: #writeSummaryFile. t2 add: 'Write Multiple Project Summaries' action: #writeMultipleSummaries]. t2 addLine. t2 add: 'Quit' action: #quitScratch. t2 localize. #(2 4 5 6 7 8 ) do: [:t3 | t2 labels at: t3 put: ((t2 labels at: t3) copyFrom: 1 to: (t2 labels at: t3) size - 1) , ScratchTranslator ellipsesSuffix]. t2 invokeOn: self at: t1 bottomLeft + (0 @ 10)! !Step 8: Select all the text by click-and-drag or by pressing (Windows) Alt+A or (Mac) Command+A
Step 9: File in the selection by clicking on the "-" in the top left corner; choosing "more...", then "file it in"
Step 10: Shift-click the loop of the "R" in the Scratch logo again and select "save image for end-user" then select "yes" when prompted. Scratch should close, and when restarted you will see a new option in the file menu: "Import Block..."
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
^Back to Scratch blocks
I tried it - It worked!
Offline
WindowsExplorer wrote:
YourLocalBlockLib wrote:
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png
^Back to Scratch blocks
How to download a Scratch block
Credit to nXIII for his patcher, which this code was based on
This is a way how you can make an "import block" item in the file menu so you can download and import blocks from the library.
Beware: this feature is untested! If you want to test it for us, great, but don't use this in your production environment yet!
The Importer
Installing the block importer is the hardest (but not very hard) thing you must do in order to import blocks. Simply follow these instructions:
Step 1: Open Scratch
Step 2: Press and hold the "shift" key while clicking the loop of the "R" in the Scratch logo
Step 3: Select "turn fill-screen off" from the popup menu which shows up
Not showing up? Make sure you're clicking inside the loop of the "R"; the "logo" referred to is the one that says "Scratch" in the top-left corner.
Step 4: Click anywhere in the "white space" which shows up at the bottom and right sides of the window
Step 5: Select "open..." from the popup menu
Step 6: Select "workspace" from the subsequent popup menu
Step 7: Copy the following text and paste it into the textbox-like window with (Windows) Alt+V or (Mac) Command+V, or by clicking the "-" button above the scrollbar (appears when the mouse is over the "workspace" window) and selecting "paste (v)"Code:
'From MIT Squeak 0.9.4 (June 1, 2003) [No updates present.] on 18 June 2010 at 5:06:17 pm'! !ScratchFileChooserDialog methodsFor: 'initialization'! createBlockFileChooserFor: t1 scratchFrame _ nil. readingScratchFile _ true. list _ ScratchFilePicker new extensions: #(#block ). self removeAllMorphs. bottomSpacer delete. bottomSpacer _ nil. mainColumn addMorphBack: list. self title: 'Import Block'. list scratchInfoClient: nil. mainColumn addMorphBack: (Morph new extent: 5 @ 9; color: Color transparent); addMorphBack: newTitleBin. fileInfoColumn addMorphBack: buttonRow. self addMorphBack: shortcutColumn; addMorphBack: mainColumn; addMorphBack: fileInfoColumn! ! !ScratchFrameMorph methodsFor: 'menu/button actions'! addBlock | t1 t2 t3 t4 | t1 _ ScratchFileChooserDialog new createBlockFileChooserFor: self; type: #block. t2 _ t1 getUserResponse. t2 = #cancelled ifTrue: [^ self]. t3 _ (FileDirectory forFileName: t2) oldFileNamed: t2. t4 _ t3 contentsOfEntireFile. (ReadWriteStream on: t4 from: 1 to: t4 size) fileIn! ! !ScratchFrameMorph methodsFor: 'menu/button actions'! fileMenu: t1 | t2 | t2 _ CustomMenu new. t2 add: 'New' action: #newScratchProject. t2 add: 'Open' action: #openScratchProject. t2 add: 'Save' action: #saveScratchProjectNoDialog. t2 add: 'Save As' action: #saveScratchProject. t2 addLine. t2 add: 'Import Project' action: #importScratchProject. t2 add: 'Export Sprite' action: #exportSprite. t2 addLine. t2 add: 'Import Block' action: #addBlock. t2 addLine. t2 add: 'Project Notes' action: #editNotes. Sensor shiftPressed ifTrue: [t2 addLine. t2 add: 'Write Project Summary' action: #writeSummaryFile. t2 add: 'Write Multiple Project Summaries' action: #writeMultipleSummaries]. t2 addLine. t2 add: 'Quit' action: #quitScratch. t2 localize. #(2 4 5 6 7 8 ) do: [:t3 | t2 labels at: t3 put: ((t2 labels at: t3) copyFrom: 1 to: (t2 labels at: t3) size - 1) , ScratchTranslator ellipsesSuffix]. t2 invokeOn: self at: t1 bottomLeft + (0 @ 10)! !Step 8: Select all the text by click-and-drag or by pressing (Windows) Alt+A or (Mac) Command+A
Step 9: File in the selection by clicking on the "-" in the top left corner; choosing "more...", then "file it in"
Step 10: Shift-click the loop of the "R" in the Scratch logo again and select "save image for end-user" then select "yes" when prompted. Scratch should close, and when restarted you will see a new option in the file menu: "Import Block..."
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
^Back to Scratch blocksI tried it - It worked!
Not for me...
Offline
777w wrote:
WindowsExplorer wrote:
YourLocalBlockLib wrote:
CODE FOR ADDING SCRATCH BLOCKS
I tried it - It worked!
Not for me...
LEARN HOW TO SHORTEN QUOTES!
Offline
Since I can't figure it out, I may as weel submit a formal block request. This is for Panther. I want a block that brings up an Informtion Dialog that displays a string of text, but I can't seem to make it work. Can someone else figure it out?
Offline
.
Scratch blocks added: [2]
Shared by Pecola1
Shared by Pecola1
Update carried out by block librarian: Pecola1
________________________________________________________________________________
^home
^updates archive
Last edited by YourLocalBlockLib (2011-05-15 07:04:49)
Offline
YourLocalBlockLib wrote:
http://welcometoyourlocalblocklibrary.w … 223741.gif
2 Blocks
Updated by: Pecola1
http://www.weebly.com/uploads/7/1/1/0/7 … 111682.gif
http://www.weebly.com/uploads/7/1/1/0/7 … 014294.gif
[Uh... I am not sure quite how to do this, or how to order it, can someone edit this? I already added the update to the update list.]
What I do is "edit" the previous one and copy the code here.
Offline
YourLocalBlockLib wrote:
http://welcometoyourlocalblocklibrary.w … 223741.gif
2 Blocks
Updated by: Pecola1
http://www.weebly.com/uploads/7/1/1/0/7 … 111682.gif
http://www.weebly.com/uploads/7/1/1/0/7 … 014294.gif
[Uh... I am not sure quite how to do this, or how to order it, can someone edit this? I already added the update to the update list.]
Another reason queues could help: it would give priority to older blocks. Not to be mean to Pecola(1), but I think older blocks should be attended to first .
Offline
YourLocalBlockLib wrote:
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png
^Back to Scratch blocks
How to download a Scratch block
Credit to nXIII for his patcher, which this code was based on
This is a way how you can make an "import block" item in the file menu so you can download and import blocks from the library.
Beware: this feature is untested! If you want to test it for us, great, but don't use this in your production environment yet!
The Importer
Installing the block importer is the hardest (but not very hard) thing you must do in order to import blocks. Simply follow these instructions:
Step 1: Open Scratch
Step 2: Press and hold the "shift" key while clicking the loop of the "R" in the Scratch logo
Step 3: Select "turn fill-screen off" from the popup menu which shows up
Not showing up? Make sure you're clicking inside the loop of the "R"; the "logo" referred to is the one that says "Scratch" in the top-left corner.
Step 4: Click anywhere in the "white space" which shows up at the bottom and right sides of the window
Step 5: Select "open..." from the popup menu
Step 6: Select "workspace" from the subsequent popup menu
Step 7: Copy the following text and paste it into the textbox-like window with (Windows) Alt+V or (Mac) Command+V, or by clicking the "-" button above the scrollbar (appears when the mouse is over the "workspace" window) and selecting "paste (v)"
Code:Code:
'From MIT Squeak 0.9.4 (June 1, 2003) [No updates present.] on 18 June 2010 at 5:06:17 pm'! !ScratchFileChooserDialog methodsFor: 'initialization'! createBlockFileChooserFor: t1 scratchFrame _ nil. readingScratchFile _ true. list _ ScratchFilePicker new extensions: #(#block ). self removeAllMorphs. bottomSpacer delete. bottomSpacer _ nil. mainColumn addMorphBack: list. self title: 'Import Block'. list scratchInfoClient: nil. mainColumn addMorphBack: (Morph new extent: 5 @ 9; color: Color transparent); addMorphBack: newTitleBin. fileInfoColumn addMorphBack: buttonRow. self addMorphBack: shortcutColumn; addMorphBack: mainColumn; addMorphBack: fileInfoColumn! ! !ScratchFrameMorph methodsFor: 'menu/button actions'! addBlock | t1 t2 t3 t4 | t1 _ ScratchFileChooserDialog new createBlockFileChooserFor: self; type: #block. t2 _ t1 getUserResponse. t2 = #cancelled ifTrue: [^ self]. t3 _ (FileDirectory forFileName: t2) oldFileNamed: t2. t4 _ t3 contentsOfEntireFile. (ReadWriteStream on: t4 from: 1 to: t4 size) fileIn! ! !ScratchFrameMorph methodsFor: 'menu/button actions'! fileMenu: t1 | t2 | t2 _ CustomMenu new. t2 add: 'New' action: #newScratchProject. t2 add: 'Open' action: #openScratchProject. t2 add: 'Save' action: #saveScratchProjectNoDialog. t2 add: 'Save As' action: #saveScratchProject. t2 addLine. t2 add: 'Import Project' action: #importScratchProject. t2 add: 'Export Sprite' action: #exportSprite. t2 addLine. t2 add: 'Import Block' action: #addBlock. t2 addLine. t2 add: 'Project Notes' action: #editNotes. Sensor shiftPressed ifTrue: [t2 addLine. t2 add: 'Write Project Summary' action: #writeSummaryFile. t2 add: 'Write Multiple Project Summaries' action: #writeMultipleSummaries]. t2 addLine. t2 add: 'Quit' action: #quitScratch. t2 localize. #(2 4 5 6 7 8 ) do: [:t3 | t2 labels at: t3 put: ((t2 labels at: t3) copyFrom: 1 to: (t2 labels at: t3) size - 1) , ScratchTranslator ellipsesSuffix]. t2 invokeOn: self at: t1 bottomLeft + (0 @ 10)! !Step 8: Select all the text by click-and-drag or by pressing (Windows) Alt+A or (Mac) Command+A
Step 9: File in the selection by clicking on the "-" in the top left corner; choosing "more...", then "file it in"
Step 10: Shift-click the loop of the "R" in the Scratch logo again and select "save image for end-user" then select "yes" when prompted. Scratch should close, and when restarted you will see a new option in the file menu: "Import Block..."
What next? =/
Offline
I fixed the update post.
~~Sparks
sci wrote:
Fixed the spelling of "length"
Last edited by YourLocalBlockLib (2011-05-15 07:09:40)
Offline
YourLocalBlockLib wrote:
I fixed the update post.
~~Sparks
Someone needs to learn how to spell "length"
Offline
scimonster wrote:
YourLocalBlockLib wrote:
I fixed the update post.
~~SparksSomeone needs to learn how to spell "length"
Offline
When Catch! 1.0.1 comes out, it will have it's own make-a-block, based on broadcasts.
So, when it comes out, can you do a Catch! block category? It could be a sub-category of Scratch blocks.
Offline
rdococ wrote:
When Catch! 1.0.1 comes out, it will have it's own make-a-block, based on broadcasts.
So, when it comes out, can you do a Catch! block category? It could be a sub-category of Scratch blocks.
How will Catch! do the block coding?
The reasons we have separate categories for Panther and BYOB is because Panther uses $$s in the code instead of %s, and BYOB is procedures.
Offline
Hardmath123 wrote:
YourLocalBlockLib wrote:
http://welcometoyourlocalblocklibrary.w … 223741.gif
2 Blocks
Updated by: Pecola1
http://www.weebly.com/uploads/7/1/1/0/7 … 111682.gif
http://www.weebly.com/uploads/7/1/1/0/7 … 014294.gif
[Uh... I am not sure quite how to do this, or how to order it, can someone edit this? I already added the update to the update list.]Another reason queues could help: it would give priority to older blocks. Not to be mean to Pecola(1), but I think older blocks should be attended to first .
Other wise i would post it, and people would ask why I didn't just do it myself, I only had the time to do those, and wasn't sure where and how many blocks needed to update.
Offline
scimonster wrote:
YourLocalBlockLib wrote:
I fixed the update post.
~~SparksSomeone needs to learn how to spell "length"
LOL! I didn't notice that until now! I'll have to edit the picture.
Offline
fixed spelling of length in blockspec and picture.
Offline
Hardmath123 wrote:
YourLocalBlockLib wrote:
http://welcometoyourlocalblocklibrary.w … 223741.gif
2 Blocks
Updated by: Pecola1
http://www.weebly.com/uploads/7/1/1/0/7 … 111682.gif
http://www.weebly.com/uploads/7/1/1/0/7 … 014294.gif
[Uh... I am not sure quite how to do this, or how to order it, can someone edit this? I already added the update to the update list.]Another reason queues could help: it would give priority to older blocks. Not to be mean to Pecola(1), but I think older blocks should be attended to first .
Offline
Yo! I Have some new BYOB Blocks!
Here are them:
photo:
spec: (sorry this one in portuguese,the next one with traduction)
photo:
spec:
photo:
spec: (to make the without beeping, use wait secs instead of play note)
I Hope you like it! I'm coming up with more soon!
Offline
scratchisthebest wrote:
sparks wrote:
scratchisthebest wrote:
I'm trying out this block importer thingamabobber. So, I got the block file browser up, but exactly how do I actually get the block? Do I copy the spec and the code into a text file, or are there separate files, or what?
Thanks!the blockspec (the single line of code with the block name in it) usually goes in Scratch-Objects >> [blocks][/blocks]ScriptableScratchMorph (class not instance) >> [blocks][/blocks]block specs and then pasted in with the others where you want it to appear in your copy of Scratch.
for the code, unless otherwise stated it should go in ScriptableScratchMorph (instance not class) >>[blocks][/blocks] <name of category you want>ops.
Hope that helpsThanks for trying-I mean the thing that you install onto Scratch and it appears in the file menu as "Import Block". You know-that thing that is based of "patcher" code. It's in post 39.
Thanks! I'll try the source way though.
EDIT: What's with the mysterious forum blocks in the quote? I had to use (blocks)(/blocks) to stop everything from getting bold!
Can somebody please help me here? Thanks!
Offline
scratchisthebest wrote:
scratchisthebest wrote:
Thanks for trying-I mean the thing that you install onto Scratch and it appears in the file menu as "Import Block". You know-that thing that is based of "patcher" code. It's in post 39.
Thanks! I'll try the source way though.
EDIT: What's with the mysterious forum blocks in the quote? I had to use (blocks)(/blocks) to stop everything from getting bold!Can somebody please help me here? Thanks!
Offline