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

#1101 2011-01-06 10:41:09

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

Re: Welcome to the OLD local block library!

scimonster wrote:

sparks wrote:

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

http://img692.imageshack.us/img692/4729/97179666.gif Shared by Pecola1.
Blockspec:

('report %b or %b randomly' #b #booleanRandom:Or:)

Code:

booleanRandom: t1 Or: t2
    | t3 |
    t3 _ self randomFrom: 0 to: 1.
    t3 = 1 ifTrue: [^ t1].
    ^ t2

What it does:
Reports it's contents. Useful for putting text in areas where it normally can't go. (such as the [go to $Sprites$] block.
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

NOT WHAT IT DOES!!!!

and also have it %m for scratch.

it should say:

Reports either of the booleans randomly

You are a good editor. I have seen that before but I forgot about it.


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

 

#1102 2011-01-06 11:03:51

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

Re: Welcome to the OLD local block library!

Pecola1 wrote:

scimonster wrote:

sparks wrote:

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

http://img692.imageshack.us/img692/4729/97179666.gif Shared by Pecola1.
Blockspec:

('report %b or %b randomly' #b #booleanRandom:Or:)

Code:

What it does:
Reports it's contents. Useful for putting text in areas where it normally can't go. (such as the [go to $Sprites$] block.
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

NOT WHAT IT DOES!!!!

and also have it %m for scratch.

it should say:

Reports either of the booleans randomly

You are a good editor. I have seen that before but I forgot about it.

Thanks.
sparks makes so many mistakes (spelling/grammar-wise) that I'm thinking of making 'Welcome to your exotic block shop!'  tongue

Offline

 

#1103 2011-01-06 12:41:52

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Welcome to the OLD local block library!

comp500 wrote:

sparks wrote:

Yes, sorry comp, they're already in the library but thanks all the same for your contribution  smile

The second one isn't in panther or scratch, just byob.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#1104 2011-01-06 13:27:56

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

Re: Welcome to the OLD local block library!

pause block.

scratch:
('pause' #- #pause)
pause
DialogBoxMorph inform: 'click OK to continue' title: 'paused'

panther:
pause
-
self showInformDialog: 'paused' withText: 'click OK to continue'

shared by sparks and TheSuccessor.

BYOB has pause function already, right?

EDIT: here is the picture: http://www.freeimagehosting.net/uploads/27cea963f8.gif

Last edited by scimonster (2011-01-06 14:55:28)

Offline

 

#1105 2011-01-06 14:25:22

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

Re: Welcome to the OLD local block library!

scimonster wrote:

...BYOB has pause function already, right?

Yep [off topic]but could be a little bit better with my block suggestion. Thanks for supporting.[/off topic]


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

Offline

 

#1106 2011-01-06 14:27:31

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Welcome to the OLD local block library!

comp500 wrote:

comp500 wrote:

sparks wrote:

Yes, sorry comp, they're already in the library but thanks all the same for your contribution  smile

The second one isn't in panther or scratch, just byob.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#1107 2011-01-06 14:29:01

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

Re: Welcome to the OLD local block library!

comp500 wrote:

comp500 wrote:

comp500 wrote:


The second one isn't in panther or scratch, just byob.

we know.
you don't have to quote yourself 3 times.

Offline

 

#1108 2011-01-06 14:59:17

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

Re: Welcome to the OLD local block library!

here is the case sensitive equals boolean.
http://www.freeimagehosting.net/uploads/fb0b728307.gif
spec:
('%s is %s' #b #case:sensitive:)
method:

Code:

case: t1 sensitive: t2 
    t1 = t2 ifTrue: [^ true].
    ^ false

SO simple

Last edited by scimonster (2011-01-09 01:01:24)

Offline

 

#1109 2011-01-06 15:02:26

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

Re: Welcome to the OLD local block library!

here is the an is lowercase boolean.
http://www.freeimagehosting.net/uploads/ef909782ed.gif
spec:
('%s is lowercase' #b #isLowercase:)
method:
isLowercase: t1
    t1 = '' ifTrue: [^ false].
    t1 = t1 asLowercase ifTrue: [^ true].
    ^ false

Offline

 

#1110 2011-01-06 15:03:55

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

Re: Welcome to the OLD local block library!

uppercase boolean:
http://www.freeimagehosting.net/uploads/0b2519e8c8.gif
spec:
('%s is uppercase' #b #isUppercase:)
method:
isUppercase: t1
    t1 = '' ifTrue: [^ false].
    t1 = t1 asUppercase ifTrue: [^ true].
    ^ false

Offline

 

#1111 2011-01-06 15:05:20

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

Re: Welcome to the OLD local block library!

mixed upper/lowercase:
http://www.freeimagehosting.net/uploads/dc35281f10.gif
spec:
('%s is mixed upper/lowercase' #b #isMixed:)
method:
isMixed: t1
    t1 = t1 asLowercase ifTrue: [^ false].
    t1 = t1 asUppercase ifTrue: [^ false].
    ^ true


Yay! 1111st post!`

Last edited by scimonster (2011-01-06 15:05:40)

Offline

 

#1112 2011-01-06 15:13:27

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

Re: Welcome to the OLD local block library!

k. I'd like to start getting deeper into squeak. Any tips?

Offline

 

#1113 2011-01-06 16:02:36

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Welcome to the OLD local block library!

Code Examination.


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#1114 2011-01-06 16:59:18

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

Re: Welcome to the OLD local block library!

I just fixed a upper case blocks that gave me an error. I'll post that along with a low case block soon.

Edit: I'm done

http://img31.imageshack.us/img31/1710/lowercase.gif

http://img5.imageshack.us/img5/945/uppercase.gif

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


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

Offline

 

#1115 2011-01-07 05:09:44

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

Re: Welcome to the OLD local block library!

I've got several BYOB blocks...


http://img600.imageshack.us/img600/6678/altarea.gif

http://img683.imageshack.us/img683/6439/area.gif

http://img835.imageshack.us/img835/4793/atan2.gif

http://img375.imageshack.us/img375/676/each.gif

http://img263.imageshack.us/img263/1394/errorlx.gif

http://img153.imageshack.us/img153/6490/exp.gif

http://img694.imageshack.us/img694/9907/freq.gif

http://img840.imageshack.us/img840/8797/log.gif

http://img31.imageshack.us/img31/8272/pointc.gif

http://img267.imageshack.us/img267/9818/root.gif

http://img43.imageshack.us/img43/8124/rotyv.gif

http://img213.imageshack.us/img213/8653/runer.gif

http://img140.imageshack.us/img140/298/same.gif

http://img405.imageshack.us/img405/770/signbo.gif

http://img211.imageshack.us/img211/797/slice.gif

http://img207.imageshack.us/img207/1043/speedq.gif

http://img80.imageshack.us/img80/2503/switch.gif


And the download file.


Wow, Panther is a great tool for automating stuff (like typing out the images and links) that would normally take an hour!  big_smile

Last edited by floppy_gunk (2011-01-07 05:19:19)


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

Offline

 

#1116 2011-01-07 06:33:34

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

Re: Welcome to the OLD local block library!

Yeah, I use Panther to add large amount of BBcode to my posts at once  tongue  It's great for that kind of thing. A tip, write the output text to a file, not a list, It's about 10 times faster! Especially if you turn on turbo-speed first!


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

Offline

 

#1117 2011-01-07 07:05:29

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

Re: Welcome to the OLD local block library!

my first block! It may not work.

Blockspec:
('alert %s' #- #alert)

code:
alert: t1
t1<-DialogBoxMorph new title: "?" inform: t1.

Does that work?

Offline

 

#1118 2011-01-07 07:47:08

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Welcome to the OLD local block library!

ProgrammingFreak wrote:

my first block! It may not work.

Blockspec:
('alert %s' #- #alert:)

code:
alert: t1
t1<-DialogBoxMorph new title: "?" inform: t1.

Does that work?

You need to have a : every area where there is an input.  big_smile


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#1119 2011-01-07 07:54:32

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

Re: Welcome to the OLD local block library!

bbbeb wrote:

ProgrammingFreak wrote:

my first block! It may not work.

Blockspec:
('alert %s' #- #alert:)

code:
alert: t1
t1<-DialogBoxMorph new title: "?" inform: t1.

Does that work?

You need to have a : every area where there is an input.  big_smile

I do..

Offline

 

#1120 2011-01-07 08:29:34

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

Re: Welcome to the OLD local block library!

Your block Should work except that you used "double speech marks" not 'single speech marks' (apostrophes) for the text '?' which you put as "?"  smile


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

Offline

 

#1121 2011-01-07 08:34:49

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

Re: Welcome to the OLD local block library!

sparks wrote:

Your block Should work except that you used "double speech marks" not 'single speech marks' (apostrophes) for the text '?' which you put as "?"  smile

cool! I like squeak!

Offline

 

#1122 2011-01-07 09:13:32

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

Re: Welcome to the OLD local block library!

It's quite a nice language, I'm enjoying it  tongue  There just does not seem to be a dictionary of commands anywhere  sad  I just have to nick commands off of snippets from other block code I find.


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

Offline

 

#1123 2011-01-07 09:29:43

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

Re: Welcome to the OLD local block library!

More blocks:

Code:

('%n!' #r #factorial:)

Code:

factorial: t1 
    t1 = 0 ifTrue: [^ 1].
    ^ (self factorial: t1 - 1)
        * t1

Code:

('freeze Scratch for %n' #- #freeze:)

Code:

freeze: t1
t1 = 0 ifTrue: [^self]
self freeze: t1-1

Note: the block above does not take the numerical value as seconds (10 would be extremely short. On my Mac, I need 1000 or more to register around 0.01-0.02 secs).

I have made the block [draw a circle with [circumference/diameter] of (10)], but it is laggy and freezes Scratch. Should I still post it?


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

Offline

 

#1124 2011-01-07 09:37:16

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

Re: Welcome to the OLD local block library!

yeah, you can still post it, I'll just add a note to say, warning, takes some time to execute.


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

Offline

 

#1125 2011-01-07 10:38:12

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Welcome to the OLD local block library!

comp500 wrote:

sparks wrote:

Yes, sorry comp, they're already in the library but thanks all the same for your contribution  smile

The second one isn't in panther or scratch, just byob.

ADD IT!

Last edited by comp500 (2011-01-07 10:38:27)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

Board footer