Note: You are strongly advised not to put this in a forever loop
('open new scratch window' #- #OpenScratch)
If your OS is Windows:
OpenScratch ScratchPlugin primOpenURL: 'Scratch.exe'
If your OS is Apple:
OpenScratch ScratchPlugin primOpenURL: 'Scratch.app'
Last edited by Greenatic (2011-08-06 11:40:07)
Offline
Greenatic wrote:
OK poemon1 Created and tested the hard way
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.gifCode:
('freeze scratch' #- #FreezeScratch)Method code:
Code:
FreezeScratch [0 = 0] whileTrueScratch-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!!!
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]. ^falseNotice how I removed the quotation marks, since you want to report true, not the letters "true".
Ah. Whoooooooooooooops...
Greenatic wrote:
http://www.freewebs.com/polyeztahpuppie … cratch.gif
Note: You are strongly advised not to put this in a forever loopCode:
('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)
Offline
TuragaTreeko wrote:
Greenatic wrote:
http://www.freewebs.com/polyeztahpuppie … cratch.gif
Note: You are strongly advised not to put this in a forever loopCode:
('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
('number of fonts' #r #FontAmount)
FontAmount ^ UnicodePlugin getFontList size
Offline
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:
encrypt $String$ with sha1
code:
| t2 | self readLine: 1 FromUrl: 'http://kitcatprogramming.net78.net/server/encrypt.php?method=sha1&content=', t1. ^t2
Offline
I'm seeing a lot of great blocks coming in. Keep 'em coming, squeakers!
Offline
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 loopCode:
('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.
Offline
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?
Offline
OK, the "open new scratch window" block's post has been edited to allow compatibility with Macs.
Offline
I would like to improve the |{google v} [how to tie a knot]| block.
Add to the engineNames array:
'youtube' 'bing' 'google images'
Add to the method (before the "load = t1" line):
'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
('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".
Last edited by TuragaTreeko (2011-08-06 19:58:59)
Offline
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Last edited by jurk (2011-08-07 01:19:52)
Offline
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Calm down.
Scratch-objects>>scriptablescratchmorph (wherever the block spec is) >>instance>>other ops.
Offline
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
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!
Offline
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
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. That;s no fair!
Offline
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:
Offline
I am back!
Offline
;D
Can you see the images? (I got right to it. )
Offline
Don't forget to remind me of this post when I do the update!
Offline
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
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.
Offline
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.
Offline