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

#1826 2011-08-05 15:32:06

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

http://www.freewebs.com/polyeztahpuppies/openscratch.gif
Note:  You are strongly advised not to put this in a forever loop  wink 

Code:

('open new scratch window' #- #OpenScratch)

If your OS is Windows:

Code:

OpenScratch
    ScratchPlugin primOpenURL: 'Scratch.exe'

If your OS is Apple:

Code:

OpenScratch
    ScratchPlugin primOpenURL: 'Scratch.app'

Last edited by Greenatic (2011-08-06 11:40:07)

Offline

 

#1827 2011-08-05 16:28:35

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

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

OK poemon1  smile   Created and tested the hard way  tongue   
IMPORTANT: the only way to end Scratch after a freeze is to end the task under Ctrl-Alt-Delete on Windows and end the task (I'm not sure how to do it on a Mac).  You will lose all unsaved data in any project, and the block.  Save the image first, and use with caution (or as a prank >:D )!
http://www.freewebs.com/polyeztahpuppie … cratch.gif

Code:

 ('freeze scratch' #- #FreezeScratch)

Method code:

Code:

FreezeScratch
    [0 = 0] whileTrue

Scratch-Blocks > CommandBlockMorph > accessing > isStop
Add to the end of the method:

Code:

| (selector = #FreezeScratch)

As I said earlier in this post, use caution with this block.

200TH POST!!!   big_smile   big_smile   big_smile

Force quit, under Command-Option-Escape for Macs.
[edit]EEK! Yeah, I can vouch for the freezing block...[/edit]

Greenatic wrote:

TuragaTreeko wrote:

Code:

('a:%n b:%n c:%n is Pythagorean triplet?' #b #py: 3 4 5 th:ag:)
py:t1:th:t2:ag:t3
t1*t1 + t2*t2 = t3*t3 ifTrue: [^'true'].
^'false'

TuragaTreeko, your block reports string values.  To make it a true boolean block, change the last two lines to:

Code:

  t1*t1 + t2*t2 = t3*t3 ifTrue: [^true].
^false

Notice how I removed the quotation marks, since you want to report true, not the letters "true".

Ah. Whoooooooooooooops... tongue

Greenatic wrote:

http://www.freewebs.com/polyeztahpuppie … cratch.gif
Note:  You are strongly advised not to put this in a forever loop  wink 

Code:

('open new scratch window' #- #OpenScratch)

Code:

OpenScratch
    ScratchPlugin primOpenURL: 'Scratch.exe'

I think that it'll have to be .image for it to work on Macs...

Last edited by TuragaTreeko (2011-08-05 16:42:06)


http://goo.gl/RDqKF

Offline

 

#1828 2011-08-05 17:03:26

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

Greenatic wrote:

http://www.freewebs.com/polyeztahpuppie … cratch.gif
Note:  You are strongly advised not to put this in a forever loop  wink 

Code:

('open new scratch window' #- #OpenScratch)

Code:

OpenScratch
    ScratchPlugin primOpenURL: 'Scratch.exe'

I think that it'll have to be .image for it to work on Macs...

Actually, I think it should be .app for Macs.  Of course, I could be wrong, I've hardly ever used a Mac.

Offline

 

#1829 2011-08-05 18:02:30

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

http://www.freewebs.com/polyeztahpuppies/fontamount.gif

Code:

('number of fonts' #r #FontAmount)

Code:

FontAmount
    ^ UnicodePlugin getFontList size

Offline

 

#1830 2011-08-05 22:32:35

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I have a Panther block for those database blocks. It is to make it so that people can put passwords in the database safely. It's the encrypt _ block I'm sorry, but I don't have an image for it. You need to make one.
NOTE!! When Kitcat 1.3 comes out, don't think that it took it from the block library. This is an original block from the currently developing Kitcat 1.3
type: r
blockspec:

Code:

encrypt $String$ with sha1

code:

Code:

| t2 |
self readLine: 1 FromUrl: 'http://kitcatprogramming.net78.net/server/encrypt.php?method=sha1&content=', t1.
^t2

I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#1831 2011-08-05 23:42:06

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I'm seeing a lot of great blocks coming in. Keep 'em coming, squeakers!

Offline

 

#1832 2011-08-06 02:10:57

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

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

TuragaTreeko wrote:

Greenatic wrote:

http://www.freewebs.com/polyeztahpuppie … cratch.gif
Note:  You are strongly advised not to put this in a forever loop  wink 

Code:

('open new scratch window' #- #OpenScratch)

Code:

OpenScratch
    ScratchPlugin primOpenURL: 'Scratch.exe'

I think that it'll have to be .image for it to work on Macs...

Actually, I think it should be .app for Macs.  Of course, I could be wrong, I've hardly ever used a Mac.

Yes, for Mac it's .app.


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

Offline

 

#1833 2011-08-06 11:25:37

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

Re: ITopic: Welcome to your local block library!

floppy_gunk wrote:

Greenatic wrote:

TuragaTreeko wrote:


I think that it'll have to be .image for it to work on Macs...

Actually, I think it should be .app for Macs.  Of course, I could be wrong, I've hardly ever used a Mac.

Yes, for Mac it's .app.

Ah. Okay.
Here's a little question that's been bugging me...

The ask block shows a percent s on the screen. What would we have to change to make it %n or a dropdown or something?


http://goo.gl/RDqKF

Offline

 

#1834 2011-08-06 11:40:55

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

OK, the "open new scratch window" block's post has been edited to allow compatibility with Macs.

Offline

 

#1835 2011-08-06 18:37:59

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I would like to improve the |{google  v} [how to tie a knot]| block.
Add to the engineNames array:

Code:

 'youtube' 'bing' 'google images'

Add to the method (before the "load = t1" line):

Code:

'youtube' = t1 ifTrue:[ScratchPlugin primOpenURL: 'http://www.youtube.com/results?search_query=' , t2, '&ag=f'].
'bing' = t1 ifTrue:[ScratchPlugin primOpenURL: 'http://www.bing.com/search?q=', t2, '&qs=n&sk=&sc=8-11&form=QBLH'].
'google images' = t1 ifTrue:[ScratchPlugin primOpenURL:  'http://www.google.com/search?tbm=isch&hl=en&source=hp&biw=1024&bih=570&q=', t2, '&aq=f&aqi=g4g-m1&aql=&gs_sm=e&gs_upl=3578l5547l0l5860l11l9l0l0l0l0l266l1078l0.2.3l5l0'].

Offline

 

#1836 2011-08-06 19:58:38

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

Re: ITopic: Welcome to your local block library!

Code:

 ('I am adjacent to x: %n y: %n?' #b #next:To:) 
next: t1 To: t2 
    self xpos = t1 + self width
        ifTrue: [self ypos = t2 + self height ifTrue: [^ true].].
    self xpos = t1 + self width
        ifTrue: [self ypos = t2 - self height ifTrue: [^ true].].
    self xpos = t1 - self width
        ifTrue: [self ypos = t2 + self height ifTrue: [^ true].].
    self xpos = t1 - self width
        ifTrue: [self ypos = t2 - self height ifTrue: [^ true].].
    ^ false

I don't actually know where this would be useful, but, it might come in handy. It checks your sprite's height and width so that something inside of the sprite's boundaries doesn't count as "next to you". big_smile

Last edited by TuragaTreeko (2011-08-06 19:58:59)


http://goo.gl/RDqKF

Offline

 

#1837 2011-08-07 01:18:51

jurk
Scratcher
Registered: 2010-05-06
Posts: 100+

Re: ITopic: Welcome to your local block library!

help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I need help: where do you put the code I know where to put the block space but not the code can any one help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!   sad

Last edited by jurk (2011-08-07 01:19:52)


http://dl.dropbox.com/u/54228408/cool.png

Offline

 

#1838 2011-08-07 02:29:06

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

jurk wrote:

help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I need help: where do you put the code I know where to put the block space but not the code can any one help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!   sad

Calm down.
Scratch-objects>>scriptablescratchmorph (wherever the block spec is) >>instance>>other ops.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#1839 2011-08-07 05:10:29

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

Re: ITopic: Welcome to your local block library!

I'm back with my own internet. It seems I missed a bunch!

Greenatic wrote:

@BothPostersWhoSuggestedDropdowns:  I would have, but I knew that Squeak was running out of unused letters to use in dropdowns.  You think that I should use up two more?

Yes.
Maybe I'll even work on setting it up to use other characters.

I'm going to start working on the update now. I'm going to keep them on my computer until I'm finished.
*gulp*

Offline

 

#1840 2011-08-07 05:38:07

Qwiffles
Scratcher
Registered: 2011-07-13
Posts: 100+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

I'm back with my own internet. It seems I missed a bunch!

Greenatic wrote:

@BothPostersWhoSuggestedDropdowns:  I would have, but I knew that Squeak was running out of unused letters to use in dropdowns.  You think that I should use up two more?

Yes.
Maybe I'll even work on setting it up to use other characters.

I'm going to start working on the update now. I'm going to keep them on my computer until I'm finished.
*gulp*

Didn't panther make it so you could have $string$ and things like that?  That would be epic!


Don't feed a pet troll.  It will turn evil.

Offline

 

#1841 2011-08-07 05:39:10

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

Re: ITopic: Welcome to your local block library!

Qwiffles wrote:

scimonster wrote:

I'm back with my own internet. It seems I missed a bunch!

Greenatic wrote:

@BothPostersWhoSuggestedDropdowns:  I would have, but I knew that Squeak was running out of unused letters to use in dropdowns.  You think that I should use up two more?

Yes.
Maybe I'll even work on setting it up to use other characters.

I'm going to start working on the update now. I'm going to keep them on my computer until I'm finished.
*gulp*

Didn't panther make it so you could have $string$ and things like that?  That would be epic!

Yes, and I could probably take several hours and do that, but... then it wouldn't be compatible with regular Scratch.

Offline

 

#1842 2011-08-07 05:41:30

Qwiffles
Scratcher
Registered: 2011-07-13
Posts: 100+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

Qwiffles wrote:

scimonster wrote:

I'm back with my own internet. It seems I missed a bunch!


Yes.
Maybe I'll even work on setting it up to use other characters.

I'm going to start working on the update now. I'm going to keep them on my computer until I'm finished.
*gulp*

Didn't panther make it so you could have $string$ and things like that?  That would be epic!

Yes, and I could probably take several hours and do that, but... then it wouldn't be compatible with regular Scratch.

Oh.   sad   That;s no fair!  mad


Don't feed a pet troll.  It will turn evil.

Offline

 

#1843 2011-08-07 09:37:17

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

Re: ITopic: Welcome to your local block library!

scimonster wrote:

I'm back with my own internet. It seems I missed a bunch!

Greenatic wrote:

@BothPostersWhoSuggestedDropdowns:  I would have, but I knew that Squeak was running out of unused letters to use in dropdowns.  You think that I should use up two more?

Yes.
Maybe I'll even work on setting it up to use other characters.

I'm going to start working on the update now. I'm going to keep them on my computer until I'm finished.
*gulp*

I tried to do that (failed, of course). I looked around in the Translators... but nothing seemed to control the dropdowns. The %(not a letter)s work in uncoloredArgMorphFor, but blockspecs doesn't get it.D:


http://goo.gl/RDqKF

Offline

 

#1844 2011-08-07 10:49:21

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

Re: ITopic: Welcome to your local block library!

I am back!


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

 

#1845 2011-08-07 10:54:44

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

Re: ITopic: Welcome to your local block library!

;D
Can you see the images? (I got right to it.  tongue )

Offline

 

#1846 2011-08-07 11:28:55

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

Re: ITopic: Welcome to your local block library!

Don't forget to remind me of this post when I do the update!

Offline

 

#1847 2011-08-07 16:01:44

ugog10
Scratcher
Registered: 2011-03-05
Posts: 8

Re: ITopic: Welcome to your local block library!

Why cant new scratchers post images in their posts?! I wanted to post a new BYOB block but I was greeted by a "Sorry, New Scratchers cannot place images in their posts. Please remove all BB code [ img ] tags." message. Please let me post. ;(

Offline

 

#1848 2011-08-07 16:04:23

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

Re: ITopic: Welcome to your local block library!

ugog10 wrote:

Why cant new scratchers post images in their posts?! I wanted to post a new BYOB block but I was greeted by a "Sorry, New Scratchers cannot place images in their posts. Please remove all BB code [ img ] tags." message. Please let me post. ;(

You could give links to the images.


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

Offline

 

#1849 2011-08-07 18:11:51

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

Re: ITopic: Welcome to your local block library!

SSBBM wrote:

ugog10 wrote:

Why cant new scratchers post images in their posts?! I wanted to post a new BYOB block but I was greeted by a "Sorry, New Scratchers cannot place images in their posts. Please remove all BB code [ img ] tags." message. Please let me post. ;(

You could give links to the images.

Nope. Only scratchers are allowed links or images. sad


http://goo.gl/RDqKF

Offline

 

#1850 2011-08-07 18:31:38

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Have you added my Panther block yet?


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

Board footer