This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#451 2011-04-15 06:54:10

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Code:

('Jump forward %n costumes' #- #nextCostume: 2)

nextCostume: t1 
    self costumeIndex: self costumeIndex + t1

Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#452 2011-04-15 07:08:20

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

Added.  smile
~~Scimonster


http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

Offline

 

#453 2011-04-15 07:15:57

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Yeah, and I changed the image to transparency for the "hidden?" block.

Offline

 

#454 2011-04-15 07:39:25

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Code:

('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)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#455 2011-04-15 12:41:06

TheScratcherOf2012
Scratcher
Registered: 2010-11-30
Posts: 11

Re: ITopic: Welcome to your local block library!

I have a question... what do you do with a block's code? Where do you put it? :S

Offline

 

#456 2011-04-15 13:51:51

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#457 2011-04-15 14:19:09

TheScratcherOf2012
Scratcher
Registered: 2010-11-30
Posts: 11

Re: ITopic: Welcome to your local block library!

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

 

#458 2011-04-15 14:26:09

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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.  smile

Last edited by scratcher7_13 (2011-04-15 14:26:24)


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

#459 2011-04-15 14:29:24

TheScratcherOf2012
Scratcher
Registered: 2010-11-30
Posts: 11

Re: ITopic: Welcome to your local block library!

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.  smile

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

 

#460 2011-04-15 14:56:42

floppy_gunk
Scratcher
Registered: 2008-11-14
Posts: 500+

Re: ITopic: Welcome to your local block library!

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.  smile

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)


http://img163.imageshack.us/img163/1917/2856lg.jpg Get it now!  smile

Offline

 

#461 2011-04-15 15:38:57

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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.

Youtongue  Only Sparks can (at least easily).  neutral

Yes me, I can quote him and copy the code.  tongue  But I didn't really think about it I just quoted him and copied the text.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#462 2011-04-15 20:57:01

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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:

r

Code:

Code:

| args |
args _ Dictionary new.
args at: t1 put: (Array with: t2).
^ (HTTPSocket httpPost: t3 args: args accept: 'application/octet-stream') contents

A test script in PHP:

Code:

<?php
foreach ($_POST as $key => $value)
{
    echo $key . ": " . $value . "\n";
}
?>

big_smile

Wait, how does this work? Do you have to learn PHP or is it a text it puts on?


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#463 2011-04-16 02:47:49

TheScratcherOf2012
Scratcher
Registered: 2010-11-30
Posts: 11

Re: ITopic: Welcome to your local block library!

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.  smile

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  tongue

Offline

 

#464 2011-04-16 07:59:24

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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:

r

Code:

Code:

| args |
args _ Dictionary new.
args at: t1 put: (Array with: t2).
^ (HTTPSocket httpPost: t3 args: args accept: 'application/octet-stream') contents

A test script in PHP:

Code:

<?php
foreach ($_POST as $key => $value)
{
    echo $key . ": " . $value . "\n";
}
?>

big_smile

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.  smile
But it is a cool language. You wouldn't be wasting your time!  big_smile

Offline

 

#465 2011-04-16 15:15:13

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I thought there was a script - Download script $string$ from block libary????????


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#466 2011-04-16 15:16:53

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

No, it's a Panther block.  smile

Offline

 

#467 2011-04-16 16:38:39

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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.png

Please add mine....
I'm working on some others also....

Offline

 

#468 2011-04-17 02:57:16

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

.                              http://welcometoyourlocalblocklibrary.weebly.com/uploads/7/1/1/0/7110842/292223741.gif


BYOB blocks added: [2]
http://welcometoyourlocalblocklibrary.weebly.com/uploads/7/1/1/0/7110842/1867437.gif by ProgrammingFreak
http://welcometoyourlocalblocklibrary.weebly.com/uploads/7/1/1/0/7110842/9482804.gif 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)


http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

Offline

 

#469 2011-04-17 03:05:11

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Why haven't my old blocks been added? I kinda lost track of them... Some were for Scratch, some BYOB.

Offline

 

#470 2011-04-17 07:19:55

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I'll add those soon.

Offline

 

#471 2011-04-17 07:21:53

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Will you add a 'list' block section? Or maybe divide the variable block section into two?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#472 2011-04-17 07:26:00

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

That's an idea...
Other Librarians?

Last edited by scimonster (2011-04-17 07:26:14)

Offline

 

#473 2011-04-17 11:54:30

markus031098
Scratcher
Registered: 2009-03-02
Posts: 23

Re: ITopic: Welcome to your local block library!

Could somebody fix the <password for [ ] is [ ] ?> block for Panther because I really need it for one of my projects.


My new account:
http://scratch.mit.edu/static/icons/buddy/1298169_med.png?t=2012-10-19+16%3A06%3A13

Offline

 

#474 2011-04-17 14:27:40

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

^ 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  hmm


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#475 2011-04-17 15:17:29

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

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

 

Board footer