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

#1251 2011-06-17 18:46:25

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

YourLocalBlockLib wrote:

.                              http://welcometoyourlocalblocklibrary.w … 223741.gif

Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0

Other updates: [0]

Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archive

WHAT?! so you added theirs, not mine?!


the the the the the

Offline

 

#1252 2011-06-17 19:20:53

pokemongardevoir
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

pokemongardevoir wrote:

SSBBM wrote:


Scratch, BYOB, or Panther blocks?

Scratch, I think. (The open URL block)

Okay, go to blockspecs. This is where you confirm the block exists, and you tell what it looks like. You also name the action it does.

for the URL block, I would do this (this is the blockspecs scimonster gave me):
('open URL: %s' #- #doOpen: )

the part in quotes is what the block says on it. the %s is a place for a string. #- means it is a stack block. #doOpen names the action open.

right click and choose accept, and go to instance. under other ops, replace the code of the broadcast with

open: t1
       cursor wait showWhile ScratchPlugin primOpen URL: t1

or something like that. I think there is actually a bracket in there somewhere. anywho, that is how you code a block.

Oh, and awesome username (gardevoir is one of my faves -- treecko is my absolute favorite).

smile

How do you get blockspecs? I'm terrible at this!


http://i48.tinypic.com/n50dt.gifhttp://tiny.cc/oj6plwhttp://tiny.cc/creepforum
My website has been approved by the Scratch Team.  (^_^)

Offline

 

#1253 2011-06-17 20:59:45

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: ITopic: Welcome to your local block library!

pokemongardevoir wrote:

How do you get blockspecs? I'm terrible at this!

In order to do Scratch blocks you must hack Scratch. Even some advanced Scratchers don't know how to add blocks to Scratch. If you don't want to go though to much trouble I would recommend downloading BYOB or Panther; they both have great block makers.

Last edited by SSBBM (2011-06-17 21:00:10)


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#1254 2011-06-17 21:00:17

pokemongardevoir
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I did the untested import thing... how do i download a block now?


http://i48.tinypic.com/n50dt.gifhttp://tiny.cc/oj6plwhttp://tiny.cc/creepforum
My website has been approved by the Scratch Team.  (^_^)

Offline

 

#1255 2011-06-17 21:01:41

pokemongardevoir
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: ITopic: Welcome to your local block library!

SSBBM wrote:

pokemongardevoir wrote:

How do you get blockspecs? I'm terrible at this!

In order to do Scratch blocks you must hack Scratch. Even some advanced Scratchers don't know how to add blocks to Scratch. If you don't want to go though to much trouble I would recommend downloading BYOB or Panther; they both have great block makers.

I think i'll be good if i just know how to download a block since i did the untested import thing.


http://i48.tinypic.com/n50dt.gifhttp://tiny.cc/oj6plwhttp://tiny.cc/creepforum
My website has been approved by the Scratch Team.  (^_^)

Offline

 

#1256 2011-06-18 02:45:46

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

Re: ITopic: Welcome to your local block library!

the untested import thing currently does not work because we haven't worked out now to get our blocks to work with it yet... Sorry!


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

Offline

 

#1257 2011-06-18 05:08:10

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

Re: ITopic: Welcome to your local block library!

jslomba wrote:

YourLocalBlockLib wrote:

.                              http://welcometoyourlocalblocklibrary.w … 223741.gif

Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0

Other updates: [0]

Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archive

WHAT?! so you added theirs, not mine?!

I didn't have time to add them all, and since yours were at the bottom of the queue, they didn't get added. I'll do another update now.


/* No comment */

Offline

 

#1258 2011-06-18 09:09:04

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TheSuccessor wrote:

jslomba wrote:

YourLocalBlockLib wrote:

.                              http://welcometoyourlocalblocklibrary.w … 223741.gif

Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0

Other updates: [0]

Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archive

WHAT?! so you added theirs, not mine?!

I didn't have time to add them all, and since yours were at the bottom of the queue, they didn't get added. I'll do another update now.

k, thanks


the the the the the

Offline

 

#1259 2011-06-18 09:23:24

pokemongardevoir
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

the untested import thing currently does not work because we haven't worked out now to get our blocks to work with it yet... Sorry!

Oh...


http://i48.tinypic.com/n50dt.gifhttp://tiny.cc/oj6plwhttp://tiny.cc/creepforum
My website has been approved by the Scratch Team.  (^_^)

Offline

 

#1260 2011-06-18 09:32:18

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

http://www.weebly.com/uploads/5/4/1/3/5413503/116274704.gifDROPDOWN  VERSION:

Blockspec:

   

('%n %X %n' #r #workOut:with:to:)

Code:

workOut: t1 with: t2 to: t3
    t2 = '+' ifTrue: [^ t1 + t3].
    t2 = 'minus' ifTrue: [^ t1 - t3].
    t2 = '*' ifTrue: [^ t1 * t3].
    t2 = '/' ifTrue: [^t1 / t3].
    ^ 'Error!'

uncoloredArgMorph:

$X = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #opNames;
         choice: '+'].

code2:

opNames
    ^ #('+' 'minus' '*' '/' )

Last edited by jslomba (2011-06-18 09:32:58)


the the the the the

Offline

 

#1261 2011-06-18 11:45:01

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TheSuccessor wrote:

jslomba wrote:

YourLocalBlockLib wrote:

.                              http://welcometoyourlocalblocklibrary.w … 223741.gif

Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0

Other updates: [0]

Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archive

WHAT?! so you added theirs, not mine?!

I didn't have time to add them all, and since yours were at the bottom of the queue, they didn't get added. I'll do another update now.

any minute now..... tongue


the the the the the

Offline

 

#1262 2011-06-18 14:03:34

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

jslomba wrote:

TheSuccessor wrote:

jslomba wrote:


WHAT?! so you added theirs, not mine?!

I didn't have time to add them all, and since yours were at the bottom of the queue, they didn't get added. I'll do another update now.

any minute now..... tongue

still waiting....


the the the the the

Offline

 

#1263 2011-06-18 14:16:33

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: ITopic: Welcome to your local block library!

I have a Panther request.

Block name:
(# of sounds)
Requested for:
Panther

Much like the # of costumes block in BYOB it reports the number of sounds for that sprite.


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#1264 2011-06-18 14:19:46

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

Re: ITopic: Welcome to your local block library!

YourLocalBlockLib wrote:

.                              http://welcometoyourlocalblocklibrary.w … 223741.gif

Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0

Other updates: [0]

Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archive

Why didn't you do block images?

Offline

 

#1265 2011-06-18 14:51:03

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

http://megamod.weebly.com/uploads/7/1/5/6/7156046/7181233.gif
blockspec:

   

('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')

code:

   

Userlink: user
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]


the the the the the

Offline

 

#1266 2011-06-18 15:05:58

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

Re: ITopic: Welcome to your local block library!

jslomba wrote:

http://megamod.weebly.com/uploads/7/1/5 … 181233.gif
blockspec:

   

('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')

code:

   

Userlink: user
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]

Wasn't that TuragaTreeko's block?

Offline

 

#1267 2011-06-18 15:19:30

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

some of the block images you needed:
http://megamod.weebly.com/uploads/7/1/5/6/7156046/3170464.gif
http://megamod.weebly.com/uploads/7/1/5/6/7156046/71427.gif
http://megamod.weebly.com/uploads/7/1/5/6/7156046/3787995.gif
http://megamod.weebly.com/uploads/7/1/5/6/7156046/4024849.gif
http://megamod.weebly.com/uploads/7/1/5/6/7156046/3340740.gif

Last edited by jslomba (2011-06-18 15:20:11)


the the the the the

Offline

 

#1268 2011-06-18 15:21:04

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

jslomba wrote:

http://megamod.weebly.com/uploads/7/1/5 … 181233.gif
blockspec:

   

('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')

code:

   

Userlink: user
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]

Wasn't that TuragaTreeko's block?

oh, it alredy exists? -.- sorry


the the the the the

Offline

 

#1269 2011-06-18 16:47:46

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

Re: ITopic: Welcome to your local block library!

jslomba wrote:

http://megamod.weebly.com/uploads/7/1/5 … 181233.gif
blockspec:

   

('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')

code:

   

Userlink: user
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]

Hey, I was working on that block!!! Except mine was all buggy. (I forgot brackets, commas, and quotes  sad )


http://goo.gl/RDqKF

Offline

 

#1270 2011-06-18 17:56:08

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

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

This is key pressed extra keys.
First go to ScriptableScratchMorph> instance> sensing ops> asciiFor:
add the strip:

Code:

'enter' localized = t2 ifTrue: [^ Character cr asciiValue].
    'shift' localized = t2 ifTrue: [^ 16].
    'control' localized = t2 ifTrue: [^ 17].
    'alt' localized = t2 ifTrue: [^ 18].
    'backspace' localized = t2 ifTrue: [^ 8].
    'escape' localized = t2 ifTrue: [^ 27].
    'f1' localized = t2 ifTrue: [^ 112].
    'f3' localized = t2 ifTrue: [^ 114].
    'f4' localized = t2 ifTrue: [^ 115].
    'f5' localized = t2 ifTrue: [^ 116].
    'f6' localized = t2 ifTrue: [^ 117].
    'f7' localized = t2 ifTrue: [^ 118].
    'f8' localized = t2 ifTrue: [^ 119].
    'f9' localized = t2 ifTrue: [^ 120].
    'f10' localized = t2 ifTrue: [^ 121].
    'f11' localized = t2 ifTrue: [^ 122].
    'f12' localized = t2 ifTrue: [^ 123].
'tab' localized = t2 ifTrue: [^ 9].

Then switch to keyNames:
add the strip

Code:

'shift' 'control' 'alt' 'backspace' 'escape' 'f1' 'f2' 'f3' 'f4' 'f5' 'f6' 'f7' 'f8' 'f9' 'f10' 'f11' 'f12' 'tab'

http://www.weebly.com/uploads/5/4/1/3/5 … 966431.png
http://www.weebly.com/uploads/5/4/1/3/5 … 435385.png

um... okay... got the keys to exist. but they don't actually sense that the keys are pressed.


http://goo.gl/RDqKF

Offline

 

#1271 2011-06-18 21:48:12

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

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

Pecola1 wrote:

...

um... okay... got the keys to exist. but they don't actually sense that the keys are pressed.

Did you change asciiFor:?


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

 

#1272 2011-06-19 06:17:48

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

Re: ITopic: Welcome to your local block library!

jslomba wrote:

jslomba wrote:

any minute now..... tongue

still waiting....

Sorry, I had to go. I will do it now though.  big_smile


/* No comment */

Offline

 

#1273 2011-06-19 08:32:41

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

Re: ITopic: Welcome to your local block library!

blockspecs:('set the variable watcher color to %c' #- #setVariableWatcherColorSelf:)

Code:setVariableWarcherColorSelf: t1
    VariableWatcherColor _ t1

Now both lists and variables can be pretty looking!

Also, I adapted this from Panther.

blockspecs:('open dialog %s with text %s' #- #doShowInformDialog:withText:)



Code:doShowInformDialog: t1 withText: t2
          DialogBoxMorph inform: t2 title: t1

Oh and here's another...

blockspecs: ('add comment to script' #- #doAddComment:)

This one doesn't require code, as it simply taps into the existing code for adding a comment.  smile

Last edited by TuragaTreeko (2011-06-19 09:04:09)


http://goo.gl/RDqKF

Offline

 

#1274 2011-06-19 08:35:28

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

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

TuragaTreeko wrote:

Pecola1 wrote:

...

um... okay... got the keys to exist. but they don't actually sense that the keys are pressed.

Did you change asciiFor:?

yes. also keynames.


http://goo.gl/RDqKF

Offline

 

#1275 2011-06-19 08:41:43

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TheSuccessor wrote:

jslomba wrote:

jslomba wrote:

any minute now..... tongue

still waiting....

Sorry, I had to go. I will do it now though.  big_smile

ok


the the the the the

Offline

 

Board footer