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

#1476 2011-06-06 12:52:12

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

Re: Cool custom blocks in Scratch

TuragaTreeko wrote:

any chance any one could help me with the other question i posted?   the one with the [blocks]<when I receive[ <when I receive[ [/blocks]? thanx.

I don't understand it.  hmm

Offline

 

#1477 2011-06-06 12:52:54

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

let me clarify. i know what to put in instance ops, just not what to put in blockspecs.


http://goo.gl/RDqKF

Offline

 

#1478 2011-06-06 12:55:15

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

Re: Cool custom blocks in Scratch

To make a hat block?

Offline

 

#1479 2011-06-06 16:07:52

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

LS97 wrote:

The link block
Ok, finally some time to add the greatest block of all. the block links the user to a webpage, program or file as long as the path  or URL is given. add in the blockspecs in the control section some kind of block code (choose whatever you want, you know how to do it). and add in the corresponding instance ops:

Code:

    Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]

So little code for such a great block... and remember to click accept!

this one. what is the "some kind of block code"?


http://goo.gl/RDqKF

Offline

 

#1480 2011-06-06 16:09:49

danwoodski
Scratcher
Registered: 2009-12-23
Posts: 100+

Re: Cool custom blocks in Scratch

TuragaTreeko wrote:

LS97 wrote:

The link block
Ok, finally some time to add the greatest block of all. the block links the user to a webpage, program or file as long as the path  or URL is given. add in the blockspecs in the control section some kind of block code (choose whatever you want, you know how to do it). and add in the corresponding instance ops:

Code:

    Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]

So little code for such a great block... and remember to click accept!

this one. what is the "some kind of block code"?

I think he means the blockspec

Last edited by danwoodski (2011-06-06 16:10:03)


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://dl.dropbox.com/u/12506914/Pics/p2e-2.png&amp;link2=http://dl.dropbox.com/u/12506914/Pics/ms.png&amp;link3=http://dl.dropbox.com/u/12506914/Pics/block%20lib.png
Starting to move on to other languages, but I'll still be around from time to time  smile

Offline

 

#1481 2011-06-06 16:22:06

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

yeah... but what do  i put in the blockspec? ...do i sound like a moron?


http://goo.gl/RDqKF

Offline

 

#1482 2011-06-07 03:10:05

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

Re: Cool custom blocks in Scratch

TuragaTreeko wrote:

yeah... but what do  i put in the blockspec? ...do i sound like a moron?

Oh, I would do:

Code:

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

Code:

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

This makes the default value the Scratch homepage. If you insert a filepath in it, it will open the file!  big_smile

Offline

 

#1483 2011-06-07 10:00:11

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

oh, i thought that you replaced the t1 with the url. Thanks!


http://goo.gl/RDqKF

Offline

 

#1484 2011-06-07 10:51:46

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

wait do you replace t1 with the url? :? <- this is my own emoticon. i just made it up, right here, right now.


http://goo.gl/RDqKF

Offline

 

#1485 2011-06-07 10:55:11

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

Re: Cool custom blocks in Scratch

No. T1 is the insert; it gets defined when the block is run.

Offline

 

#1486 2011-06-07 14:14:34

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

okay.  smile


http://goo.gl/RDqKF

Offline

 

#1487 2011-06-07 14:40:02

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

okay, got the block, but it says Message not understood:open. help? but, I actually have a block that says "open (space for URL)", which is like the biggest breakthrough in the world.  smile  ... but also  roll


http://goo.gl/RDqKF

Offline

 

#1488 2011-06-07 17:54:34

danwoodski
Scratcher
Registered: 2009-12-23
Posts: 100+

Re: Cool custom blocks in Scratch

TuragaTreeko wrote:

yeah... but what do  i put in the blockspec? ...do i sound like a moron?

sorry...didn't see that he mentioned it was a blockspec  tongue


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://dl.dropbox.com/u/12506914/Pics/p2e-2.png&amp;link2=http://dl.dropbox.com/u/12506914/Pics/ms.png&amp;link3=http://dl.dropbox.com/u/12506914/Pics/block%20lib.png
Starting to move on to other languages, but I'll still be around from time to time  smile

Offline

 

#1489 2011-06-07 20:02:15

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

it's okay. my problem now is that it doesn't understand the command open. any ideas? please? you're all very awesome for helping me. just like this guy ->  cool


http://goo.gl/RDqKF

Offline

 

#1490 2011-06-07 20:15:26

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

ScratchSpriteMorph(Object)>>error:
[] in PasteUpMorph>>runStepMethods
[] in BlockContext>>ifError:
ScratchSpriteMorph(Object)>>error:
ScratchSpriteMorph(Object)>>doesNotUnderstand:
CommandBlockMorph>>evaluateWithArgs:
ScratchProcess>>applyPrimitive
ScratchProcess>>evaluateCommandFor:
ScratchProcess>>evaluateFor:
ScratchProcess>>runStepFor:

this is what it spits out when I try to use the URL block.
my script is

[block]<when[  ]clicked>[/block]
open http://www.scratch.mit.edu/

also, i think I replaced the [block]<broadcast[/block] with my open URL block. could that be the problem?


http://goo.gl/RDqKF

Offline

 

#1491 2011-06-08 08:26:49

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

okay, my problem was that my instance ops didn't get saved. any idea how to add a block to the "other ops" list? but i replaced the broadcast block and completely screwed uo scratch so i had to reinstall. but i found my problem, so it's all good.


http://goo.gl/RDqKF

Offline

 

#1492 2011-06-08 08:37:49

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

I need to clarify.  because I CREATED a new block instead of replacing an old one, I don't know what the "corresponding instance ops" is. when I replaced the broadcast block, there was a broadcast ops for me to edit. but I made a new block, so no ops for me to define the command "open" in. (my problem last time was that I forgot to save my instance ops, and also replacing the broadcast really messed up scratch)


http://goo.gl/RDqKF

Offline

 

#1493 2011-06-08 22:40:42

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

I may be wearing out my welcome with my endless string of posts that goes on and on and is really annoying, but you can all hear that this is my last one and that I got my block to work. Thank you for tolerating me while I was here, and just, overall,  smile .


http://goo.gl/RDqKF

Offline

 

#1494 2011-06-09 10:45:53

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

Re: Cool custom blocks in Scratch

TuragaTreeko wrote:

okay, got the block, but it says Message not understood:open. help? but, I actually have a block that says "open (space for URL)", which is like the biggest breakthrough in the world.  smile  ... but also  roll

Make sure there's a colon at the end...

TuragaTreeko wrote:

okay, my problem was that my instance ops didn't get saved. any idea how to add a block to the "other ops" list? but i replaced the broadcast block and completely screwed uo scratch so i had to reinstall. but i found my problem, so it's all good.

It's supposed to add the new method.

Offline

 

#1495 2011-06-09 10:48:02

rokstar
New Scratcher
Registered: 2011-06-09
Posts: 3

Re: Cool custom blocks in Scratch

why did you send me this

Offline

 

#1496 2011-06-09 10:52:13

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: Cool custom blocks in Scratch

its okay everyone, I have built several new blocks in two days since figuring this out. please see my project "experimental blocks -- DO NOT TOUCH!" (i haven't figured out how to link a project)


http://goo.gl/RDqKF

Offline

 

#1497 2011-06-09 10:54:07

rokstar
New Scratcher
Registered: 2011-06-09
Posts: 3

Re: Cool custom blocks in Scratch

why can't we touch it

Offline

 

#1498 2011-06-09 14:12:27

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Cool custom blocks in Scratch

Have we forgotten how to use the quote tag?


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

#1499 2011-06-09 15:43:50

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

Re: Cool custom blocks in Scratch

whizzer wrote:

Have we forgotten how to use the quote tag?

tongue , even though IMO that was quite rude.

Offline

 

#1500 2011-06-09 15:49:16

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

Re: Cool custom blocks in Scratch

LS97 wrote:

whizzer wrote:

Have we forgotten how to use the quote tag?

tongue , even though IMO that was quite rude.

tongue

Offline

 

Board footer