('Jump forward %n costumes' #- #nextCostume: 2) nextCostume: t1 self costumeIndex: self costumeIndex + t1
Offline
Yeah, and I changed the image to transparency for the "hidden?" block.
Offline
('Add global list named %s' #- #GLN: #MyList) GLN: t2 | t1 | (t1 _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self beep]. t2 size = 0 ifTrue: [^ self]. t1 workPane createListNamed: t2. t1 viewerPane categoryChanged: 'variables'
EDIT: My 500th post!
Last edited by Hardmath123 (2011-04-15 09:21:08)
Offline
I have a question... what do you do with a block's code? Where do you put it? :S
Offline
sparks wrote:
TheScratcherOf2012 wrote:
I have a question... what do you do with a block's code? Where do you put it? :S
For which program? Scratch, Panther or BYOB?
Scratch.
Offline
TheScratcherOf2012 wrote:
sparks wrote:
TheScratcherOf2012 wrote:
I have a question... what do you do with a block's code? Where do you put it? :S
For which program? Scratch, Panther or BYOB?
Scratch.
The code for blocks goes in ScriptableScratchMorph (if the block is for both the stage and sprite), ScratchStageMorph or ScratchSpriteMorph (Scratch-Objects > ScriptableScratchMorph, ScratchStageMorph, or ScratchSpriteMorph > (instance)) then (appropriate category) ops.
Last edited by scratcher7_13 (2011-04-15 14:26:24)
Offline
scratcher7_13 wrote:
TheScratcherOf2012 wrote:
sparks wrote:
For which program? Scratch, Panther or BYOB?Scratch.
The code for blocks goes in ScriptableScratchMorph (if the block is for both the stage and sprite), ScratchStageMorph or ScratchSpriteMorph (Scratch-Objects > ScriptableScratchMorph, ScratchStageMorph, or ScratchSpriteMorph > (instance)) then (appropriate category) ops.
I've tried that, but it said "Unknown variable" and glitched... I was trying to put the first part of the "Google $String$" block inside sensingOps.
Offline
TheScratcherOf2012 wrote:
scratcher7_13 wrote:
TheScratcherOf2012 wrote:
Scratch.
The code for blocks goes in ScriptableScratchMorph (if the block is for both the stage and sprite), ScratchStageMorph or ScratchSpriteMorph (Scratch-Objects > ScriptableScratchMorph, ScratchStageMorph, or ScratchSpriteMorph > (instance)) then (appropriate category) ops.
I've tried that, but it said "Unknown variable" and glitched... I was trying to put the first part of the "Google $String$" block inside sensingOps.
Scratch doesn't use $ symbols like in '$String$' to create arguments. Instead it uses a '%' followed by a character. Try replacing '$String$' with '%s' and see if it works.
Last edited by floppy_gunk (2011-04-15 14:57:00)
Offline
scimonster wrote:
Pecola1 wrote:
This thread is now closed as the Block Library has moved.
Click here to visit the new Library!
Please do not post here without good cause, instead post any queries in the new thread, thank you!
Moderators please do not actually close this thread, I may need to make changes or copy code at a later date, thank you.You? Only Sparks can (at least easily).
Yes me, I can quote him and copy the code. But I didn't really think about it I just quoted him and copied the text.
Offline
MathWizz wrote:
I made a panther block JD1 may like... A POST BLOCK! Now you can post to PHP scripts with squeak!
Name:Code:
post key $String$ and value $String$ to $String$Type:
Code:
rCode:
Code:
| args | args _ Dictionary new. args at: t1 put: (Array with: t2). ^ (HTTPSocket httpPost: t3 args: args accept: 'application/octet-stream') contentsA test script in PHP:
Code:
<?php foreach ($_POST as $key => $value) { echo $key . ": " . $value . "\n"; } ?>
Wait, how does this work? Do you have to learn PHP or is it a text it puts on?
Offline
floppy_gunk wrote:
TheScratcherOf2012 wrote:
scratcher7_13 wrote:
The code for blocks goes in ScriptableScratchMorph (if the block is for both the stage and sprite), ScratchStageMorph or ScratchSpriteMorph (Scratch-Objects > ScriptableScratchMorph, ScratchStageMorph, or ScratchSpriteMorph > (instance)) then (appropriate category) ops.I've tried that, but it said "Unknown variable" and glitched... I was trying to put the first part of the "Google $String$" block inside sensingOps.
Scratch doesn't use $ symbols like in '$String$' to create arguments. Instead it uses a '%' followed by a character. Try replacing '$String$' with '%s' and see if it works.
I knew that I was just trying to show the argument
Offline
Pecola1 wrote:
MathWizz wrote:
I made a panther block JD1 may like... A POST BLOCK! Now you can post to PHP scripts with squeak!
Name:Code:
post key $String$ and value $String$ to $String$Type:
Code:
rCode:
Code:
| args | args _ Dictionary new. args at: t1 put: (Array with: t2). ^ (HTTPSocket httpPost: t3 args: args accept: 'application/octet-stream') contentsA test script in PHP:
Code:
<?php foreach ($_POST as $key => $value) { echo $key . ": " . $value . "\n"; } ?>
Wait, how does this work? Do you have to learn PHP or is it a text it puts on?
I think you'd have to learn it.
But it is a cool language. You wouldn't be wasting your time!
Offline
I thought there was a script - Download script $string$ from block libary????????
Offline
No, it's a Panther block.
Offline
ProgrammingFreak wrote:
ProgrammingFreak wrote:
My new BYOB block, Draw.
Oh, and the square reporter is another block without code.
http://img847.imageshack.us/img847/5325/drawblock.pngPlease add mine....
I'm working on some others also....
Offline
.
BYOB blocks added: [2]
by ProgrammingFreak
by Scimonster, based on the block by ProgrammingFreak
Other Updates:
Converted all Panther Sensing blocks to weebly.
Update carried out by block librarian: Scimonster
________________________________________________________________________________
^home
^updates archive
Last edited by YourLocalBlockLib (2011-04-21 14:11:06)
Offline
Why haven't my old blocks been added? I kinda lost track of them... Some were for Scratch, some BYOB.
Offline
I'll add those soon.
Offline
Will you add a 'list' block section? Or maybe divide the variable block section into two?
Offline
That's an idea...
Other Librarians?
Last edited by scimonster (2011-04-17 07:26:14)
Offline
Could somebody fix the <password for [ ] is [ ] ?> block for Panther because I really need it for one of my projects.
Offline
^ Sorry markus, I will fix it now.
@Librarians I'm afraid that even if you have dropbox you cannot host a text file for a Panther block as the download block connects directly to my dropbox account. Someone did this with the password block mentioned above. If any more are like this please tell me so I can move the text files to my dropbox, else the download won't work
Offline
Why don't we use a shared dropbox account and reprogram the block?
Oh, and is it SSBBM's email that is in the top right of a weebly page, where it says
[removed by self]@yahoo.com | Upgrade to Pro! | Logout
Offline