This is my BEST Block for SURE!!!! Also, one of my favorite blocks of all! It took like fourty five minutes to make!
It searches on google, scratch, scratch search, yahoo, youtube, IMDB or tests to see if the person using the project has the block. So to get it, do these codes in the browser.
this one goes in Scratch Objects -> Scriptable Sprite Morph -> sensing ops ->
doThis: t1 on: t2
| engines l |
'google' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://www.google.com/#sclient=psy&hl=en&q=' , t2 , '&aq=f&aqi=g5&aql=&oq=&gs_rfai=&pbx=1&fp=ab5cdb1806fef4aa&safe=activet1'].
'yahoo' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://search.yahoo.com/search;_ylt=Aj.OqjGVrkBmY6mZqA_PSu.bvZx4?p=' , t2 , '&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-701'].
'scratch.mit.edu/' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/' , t2].
'search scratch for' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/pages/results?cx=010101365770046705949:gg_q9cry0mq&cof=FORID:11&q=' , t2 , '&safe=active&sa=search'].
'IMDB' = t1 ifTrue: [ScratchPlugin primOpenURL: 'http://www.imdb.com/find?s=all&q=' , t2].
'load' = t1 ifTrue: [^ 0].
^ 0and this one also goes in the same place:
engineNames
^ #('google' 'yahoo' 'scratch.mit.edu/' 'search scratch for' 'IMDB' 'load' )and this one goes in scratch objects -> scriptable sprite morph -> class -> block specs -> block specs (just put it in sensing)
('%j %s' #- #doThis:on:)now this one goes in Scratch Blocks -> Command Block Morph -> Private -> uncoloredArgMorphFor (delete all of it and replace it with this)
uncoloredArgMorphFor: t1
| t2 |
t2 _ t1 at: 2.
$a = t2 ifTrue: [^ AttributeArgMorph new choice: 'volume'].
$b = t2 ifTrue: [^ BooleanArgMorph new].
$c = t2 ifTrue: [^ ColorArgMorph new showPalette: true].
$C = t2 ifTrue: [^ ColorArgMorph new showPalette: false].
$d = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '0';
menuSelector: #directionMenu].
$D = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '48';
menuSelector: #midiDrumMenu].
$e = t2 ifTrue: [^ EventTitleMorph new].
$f = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #mathFunctionNames;
choice: 'sqrt'].
$g = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #graphicEffectNames;
choice: 'color'].
$j = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #engineNames;
choice: 'google'].
$H = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupSensorNames].
$h = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupBooleanSensorNames].
$I = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1';
menuSelector: #midiInstrumentMenu].
$i = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1';
menuSelector: #listIndexMenu].
$k = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #keyNames;
choice: 'space'].
$L = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #listVarMenu].
$l = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #costumeNames;
choice: 'costume1'].
$m = t2 ifTrue: [^ SpriteArgMorph new].
$M = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorNames].
$n = t2 ifTrue: [^ ExpressionArgMorph new numExpression: '10'].
$N = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '60';
menuSelector: #noteSelector].
$s = t2 ifTrue: [^ ExpressionArgMorph new stringExpression: ''].
$S = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #soundNames;
choice: 'pop'].
$v = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #varNamesMenu;
choice: ''].
$W = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorDirection].
$x = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #sceneNames;
choice: ''].
$y = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1';
menuSelector: #listIndexForDeleteMenu].
^ ExpressionArgMorph new numExpression: '10'And we're done! So here are a Frequently Asked Questions:
Q: What is 'load' for?
A: Load doesn't do anything. It is used to make sure people using your project have the block.
Q: Will this screw up my scratch?
A: It shouldn't, but tell me if it does.
Q: Can I put this in my Source Code mod?
A: Yes, but please, please, please give me some credit!
Q: Youtube doesn't work!
A: It should work but if it doesn't tell me.
Last edited by midnightleopard (2010-09-17 12:29:56)
Offline
SSmmmaaarrrtt.....?
(begin ranting)
And Common Sense Dictates to NOT press the green flag on any hacked mod without checking it first.
Once, i made a program that searched your documents and cleared all .txt files.
I deleted it to make sure it didn't come back. It was in PANTHER too!!! AAHHH!!!!
PAANNNTTTHHHHEEERRR CAN LAUNCH MALICIOUS CODE!!!!!! SCCCRRREEEEEAAAAMMM!!
/rant
Offline
bbbeb wrote:
SSmmmaaarrrtt.....?
(begin ranting)
And Common Sense Dictates to NOT press the green flag on any hacked mod without checking it first.
Once, i made a program that searched your documents and cleared all .txt files.
I deleted it to make sure it didn't come back. It was in PANTHER too!!! AAHHH!!!!
PAANNNTTTHHHHEEERRR CAN LAUNCH MALICIOUS CODE!!!!!! SCCCRRREEEEEAAAAMMM!!
/rant
Malicious code that doesn't control itself...doesn't seem that bad...
Offline
ScratchReallyROCKS wrote:
bbbeb wrote:
SSmmmaaarrrtt.....?
(begin ranting)
And Common Sense Dictates to NOT press the green flag on any hacked mod without checking it first.
Once, i made a program that searched your documents and cleared all .txt files.
I deleted it to make sure it didn't come back. It was in PANTHER too!!! AAHHH!!!!
PAANNNTTTHHHHEEERRR CAN LAUNCH MALICIOUS CODE!!!!!! SCCCRRREEEEEAAAAMMM!!
/rantMalicious code that doesn't control itself...doesn't seem that bad...
Yeah..... doesn't control itself, eh?.... you would love to see that, wouldny you? WOULDNT YOU? WOULDNT YOU?! WOULDNT YOU?!?!?
Just Kidding. It can get out of hand, though.
Offline
no malicious code has been submitted to the Panther site as of yet, I do carefully check every single project before I upload it, but yes, it worries me too. Even so, that's the price to pay for more control.
You should be glad you didn't accidentally run it and delete your files
______________________________________________
I like this idea, it's a lot safer than the free URL block, though in the same way as above, it's limited in it's application.
Offline
bbbeb wrote:
ScratchReallyROCKS wrote:
bbbeb wrote:
SSmmmaaarrrtt.....?
(begin ranting)
And Common Sense Dictates to NOT press the green flag on any hacked mod without checking it first.
Once, i made a program that searched your documents and cleared all .txt files.
I deleted it to make sure it didn't come back. It was in PANTHER too!!! AAHHH!!!!
PAANNNTTTHHHHEEERRR CAN LAUNCH MALICIOUS CODE!!!!!! SCCCRRREEEEEAAAAMMM!!
/rantMalicious code that doesn't control itself...doesn't seem that bad...
Yeah..... doesn't control itself, eh?.... you would love to see that, wouldny you? WOULDNT YOU? WOULDNT YOU?! WOULDNT YOU?!?!?
Just Kidding. It can get out of hand, though.
Woah! Turn down the rant meter!
Offline
ScratchReallyROCKS wrote:
bbbeb wrote:
ScratchReallyROCKS wrote:
Malicious code that doesn't control itself...doesn't seem that bad...Yeah..... doesn't control itself, eh?.... you would love to see that, wouldny you? WOULDNT YOU? WOULDNT YOU?! WOULDNT YOU?!?!?
Just Kidding. It can get out of hand, though.Woah! Turn down the rant meter!
![]()
Yeah...
[OT] I used this block in a forever script, guess what that did!!![/OT]
Offline
ssss wrote:
ScratchReallyROCKS wrote:
bbbeb wrote:
Yeah..... doesn't control itself, eh?.... you would love to see that, wouldny you? WOULDNT YOU? WOULDNT YOU?! WOULDNT YOU?!?!?
Just Kidding. It can get out of hand, though.Woah! Turn down the rant meter!
![]()
Yeah...
[OT] I used this block in a forever script, guess what that did!!![/OT]
A lot of stuff.
When you put a clear file [pick random 1- 99999999] bad things happen in the Panther folder. Bad things.
sparks wrote:
no malicious code has been submitted to the Panther site as of yet, I do carefully check every single project before I upload it, but yes, it worries me too. Even so, that's the price to pay for more control.
You should be glad you didn't accidentally run it and delete your files![]()
I am so happy i was able to delete the script before it went insane.
__________________________________________________________________________
This was a great idea! Now i can link to Scratch pages without having to worry about hacked browsers.... and linking to terrible sites....
At least Sparks checks the Panther uploads!!!
Last edited by bbbeb (2010-09-14 11:19:51)
Offline
midnightleopard wrote:
For instance do:
Code:
openWebsiteOn: t1 Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/' , t1]
Cursor wait showWhile: just shows the wait cursor while the bit in square brackets is being performed. It isn't really necessary.
Offline
TheSuccessor wrote:
midnightleopard wrote:
For instance do:
Code:
openWebsiteOn: t1 Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/' , t1]Cursor wait showWhile: just shows the wait cursor while the bit in square brackets is being performed. It isn't really necessary.
It makes the "link" experience more real
Offline
nXIII wrote:
TheSuccessor wrote:
midnightleopard wrote:
For instance do:
Code:
openWebsiteOn: t1 Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/' , t1]Cursor wait showWhile: just shows the wait cursor while the bit in square brackets is being performed. It isn't really necessary.
It makes the "link" experience more real
![]()
well, i suppose so.
i think the best would be to hve your own custom cursor for links. i don't know what the best would be though
Offline
bbbeb wrote:
When you put a clear file [pick random 1- 99999999] bad things happen in the Panther folder. Bad things.
You are refering to the Panther glitch where trying to clear a non existant file will create it instead.
Offline
sparks wrote:
bbbeb wrote:
When you put a clear file [pick random 1- 99999999] bad things happen in the Panther folder. Bad things.
You are refering to the Panther glitch where trying to clear a non existant file will create it instead.
Exactly.
Then why didnt you create a function to [Make file []]?!?!?!\
{end offtopic}
Last edited by bbbeb (2010-09-14 15:29:34)
Offline
sparks wrote:
bbbeb wrote:
When you put a clear file [pick random 1- 99999999] bad things happen in the Panther folder. Bad things.
You are refering to the Panther glitch where trying to clear a non existant file will create it instead.
we're did you learn to spell?!
Offline
Yeah. Please could you not Threadjack this? Thank you!
And yes, the cursor waitwhileshow thing makes it look cooler! I think you can change it in the skin to make it look different. I might try to do a 'search google for' block.
Offline
I just made [search google for...] block! It's amazing! Will post it later.
Offline
Daffy22 wrote:
sparks wrote:
bbbeb wrote:
When you put a clear file [pick random 1- 99999999] bad things happen in the Panther folder. Bad things.
You are refering to the Panther glitch where trying to clear a non existant file will create it instead.
we're did you learn to spell?!
![]()
![]()
But 'where' is correct...
Admittedly, 'in which' would be a better choice, not 'we're.' However, you could point out the misspelling of 'referring' and 'existent.'
Offline
nXIII wrote:
Daffy22 wrote:
sparks wrote:
You are refering to the Panther glitch where trying to clear a non existant file will create it instead.
we're did you learn to spell?!
![]()
![]()
But 'where' is correct...
Admittedly, 'in which' would be a better choice, not 'we're.' However, you could point out the misspelling of 'referring' and 'existent.'
NXIII i caught you!
Finally!
Lol.
Is it possible to make a (file [string] exists) and a [make file [] ] block?
Just want to know
Last edited by bbbeb (2010-09-14 15:50:29)
Offline
nXIII wrote:
Daffy22 wrote:
sparks wrote:
You are refering to the Panther glitch where trying to clear a non existant file will create it instead.we're did you learn to spell?!
![]()
![]()
But 'where' is correct...
Admittedly, 'in which' would be a better choice, not 'we're.' However, you could point out the misspelling of 'referring' and 'existent.'
Where:
EG. Where did you last see it?
so it should be we're - short for We are so thats what it should be
Offline
bbbeb wrote:
nXIII wrote:
Daffy22 wrote:
we're did you learn to spell?!
![]()
![]()
But 'where' is correct...
Admittedly, 'in which' would be a better choice, not 'we're.' However, you could point out the misspelling of 'referring' and 'existent.'NXIII i caught you!
Oh, I read your post wrong. I thought there was an implied full stop or semicolon between the boldy-red 'we're' and the 'did you learn....' Now I realize you were using the incorrect word to emphasize the other misspellings. Sorry.
Last edited by nXIII (2010-09-14 15:56:57)
Offline
nXIII wrote:
bbbeb wrote:
nXIII wrote:
But 'where' is correct...
Admittedly, 'in which' would be a better choice, not 'we're.' However, you could point out the misspelling of 'referring' and 'existent.'NXIII i caught you!
Oh, I read your post wrong. I thought there was an implied full stop or semicolon between the boldy-red 'we're' and the 'did you learn....' Now I realize you were using the incorrect word to emphasize the other misspellings. Sorry.
lol, yeah!
Offline
hey check it out again, I changed it... a lot... a ton... it now does google, yahoo, youtube, and more.
Offline