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

#1 2010-12-05 08:38:32

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

Projects with custom blocks

Have you made any custom blocks in scratch?
Have you made projects with them?
Are you annoyed that you are the only one who can run them?
Do you wish you could share those projects?

Now you can!  smile

Put a link to the project here, along with the blockspecs and coding for the blocks.  use the format i have in the next post:

Link to the project that uses these blocks
block specs:
Scratch-Objects > ScriptableScratchMorph (class) > block specs > blockSpecs

Code:

blockspecs

Put in wherever, then, go to Scratch-Objects > ScriptableScratchMorph (instance) > whatever ops

Code:

code

If you don't know how to open the browser to add blocks, see this project by me.

If you need help with the coding, there are may excellent topics, such as, for scratch: Cool custom blocks in Scratch, by LS97, ITopic: Welcome to your local block library!, by sparks, The anatomy of a Scratch block., by ScratchReallyROCKS, and for the source code: ITopic: Cool Source code tricks..., by billyedward, Squeak - A step-by-step beginner's tutorial, also by LS97.

Last edited by scimonster (2011-01-17 12:01:04)

Offline

 

#2 2010-12-05 08:58:47

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

Re: Projects with custom blocks

http://scratch.mit.edu/projects/scimonster/1460795 and
http://scratch.mit.edu/projects/scimonster/1339247

block specs:
Scratch-Objects > ScriptableScratchMorph (class) > block specs > blockSpecs

Code:

('open %s' #- #getLink: 'http://scratch.mit.edu/')

put in control, then, go to Scratch-Objects > ScriptableScratchMorph (instance) > other ops and add:

Code:

doLink: t1 
    Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]

Credit to billyedward for this block.

Last edited by scimonster (2011-02-22 08:10:17)

Offline

 

#3 2010-12-05 11:06:36

subzerostig
Scratcher
Registered: 2010-09-08
Posts: 100+

Re: Projects with custom blocks

Well currently no projects, but would it be possible to add: itopic-welcome to your local block library


There are 10 types of people people in this world, those that understand binary and those that do not: My latest Project: Present catcher V2                          06/12/2012

Offline

 

#4 2010-12-05 11:58:29

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

Re: Projects with custom blocks

Hi! You might like to credit Billyedward who was the person who first came up with the code for the URL link block you posted above  smile


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

Offline

 

#5 2010-12-05 12:07:07

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Projects with custom blocks

I like the idea, but it looks to me like a half duplicate to sparks' block lib.

maybe a website could do the trick  smile

Offline

 

#6 2010-12-07 01:42:11

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

Re: Projects with custom blocks

sparks wrote:

Hi! You might like to credit Billyedward who was the person who first came up with the code for the URL link block you posted above  smile

actually, i got this one from cool custom blocks in scratch, but i changed the wording to say 'open' when i realized it could open programs and files, not just websites.

Offline

 

#7 2010-12-07 01:52:18

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

Re: Projects with custom blocks

subzerostig wrote:

Well currently no projects, but would it be possible to add: itopic-welcome to your local block library

ok, done

Offline

 

#8 2010-12-07 08:08:56

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

Re: Projects with custom blocks

LS97 wrote:

I like the idea, but it looks to me like a half duplicate to sparks' block lib.

maybe a website could do the trick  smile

what do you mean?  this is just a place for projects that use custom blocks.

Offline

 

#9 2011-01-10 08:31:53

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

Re: Projects with custom blocks

i just realized i had another project with the same block.  see second post.

Offline

 

#10 2011-01-17 12:01:29

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

Re: Projects with custom blocks

added my new project for opening the browser

Offline

 

#11 2011-01-17 12:32:49

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Projects with custom blocks

Are you allowed to upload projects to the Scratch site with hacked blocks in? I'm not sure you are.


/* No comment */

Offline

 

#12 2011-01-17 13:13:50

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

Re: Projects with custom blocks

Well, mods aren't allowed to upload projects, and I'm not sure about the first link which requires the block to work, but the second is only a side feature and is 100% allowed.

Offline

 

#13 2011-02-22 08:09:40

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

Re: Projects with custom blocks

http://scratch.mit.edu/projects/gnk2200/1611568

block spec:

Code:

('%j %s' #- #doThis:on:)

Go to Scratch-Blocks -> CommandBlockMorph -> private -> uncoloredArgMorphFor: and add this:

Code:

    $j = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #engineNames;
         choice: 'google'].

Then go to Scratch-Objects -> ScriptableScratchMorph -> sensing ops and add:

Code:

doThis: t1 on: t2 
    | engines l |
    'google' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://www.google.com/#sclient=psy&hl=en&q=' , t2 , '&aq=f&aqi=g5&aql=&oq=&gs_rfai=&pbx=1&fp=ab5cdb1806fef4aa&safe=activet1'].
    'yahoo' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://search.yahoo.com/search;_ylt=Aj.OqjGVrkBmY6mZqA_PSu.bvZx4?p=' , t2 , '&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-701'].
    'scratch.mit.edu/' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/' , t2].
    'search scratch for' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/pages/results?cx=010101365770046705949:gg_q9cry0mq&cof=FORID:11&q=' , t2 , '&safe=active&sa=search'].
    'IMDB' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://www.imdb.com/find?s=all&q=' , t2].
    'load' = t1 ifTrue: [^ 0].
    ^ 0

Offline

 

#14 2011-02-22 18:19:25

gnk2200
Scratcher
Registered: 2009-10-23
Posts: 100+

Re: Projects with custom blocks

Thanks for adding OpenFind Search Starter!

Offline

 

#15 2011-02-23 03:53:16

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

Re: Projects with custom blocks

gnk2200 wrote:

Thanks for adding OpenFind Search Starter!

You're welcome. This also proved something to me, that they will show and even work if the other person has the exact same code (like I do.  smile  )

Last edited by scimonster (2011-02-23 03:53:24)

Offline

 

Board footer