Hi,
I'm a new member and I'm trying to write simple blocks using SmallTalk.
I have a question about the #r statment. I want to write a block similar to "timer" block in sensing category but i don't want to have the check box allowing "View on stage" (the final results should be similar to "mousex" in the same category).
Do you have solutions or suggestions?
Thank you.
Regards,
Pier Andrea.
Offline
paserra wrote:
Hi,
I'm a new member and I'm trying to write simple blocks using SmallTalk.
I have a question about the #r statment. I want to write a block similar to "timer" block in sensing category but i don't want to have the check box allowing "View on stage" (the final results should be similar to "mousex" in the same category).
Do you have solutions or suggestions?
Thank you.
Regards,
Pier Andrea.
Welcome paserra.
I think this is what you need to do:
1) Got to Scratch-Blocks -> CommandBlockMorph -> Private
2) Edit the the canBecomeWatcher method so that the name of your method you are adding is listed in the brackets with the other methods in it, like this:
canBecomeWatcher | t1 | t1 _ selector asString findAnySubStr: #('mouse' 'key' 'touching' 'distance' ) startingAt: 1. ^ self isReporter & (self argumentCount <= 1) & (#(#not #atRandom #abs #rounded #lineCountOfList: #stringLength: #INSERT METHOD NAME HERE) includes: selector) not & (t1 > selector asString size)
Hope this helps!
Offline
@Sperry:
couldn't have said it better!
Offline
Joeman592 wrote:
how do i make my skin upload into my mod?
Maybe this tutorial, and its sequels, can help you:
http://scratch.mit.edu/projects/Wolfie1996/972636
Offline
jmarie wrote:
<mouse down? move( )steps distance to[ color[ ] Please Scratch team make this script
I have a really complicated project to make. Please?
could you explain yourself better?
Offline
coolstuff wrote:
Joeman592 wrote:
how do i make my skin upload into my mod?
Maybe this tutorial, and its sequels, can help you:
http://scratch.mit.edu/projects/Wolfie1996/972636
i don't think that's the best way of changing the skin. besides, the tutorial doesn't include graphic elements. to load the new skin into your mod,
- make sure the skin is in a folder called ScratchSkin in the root directory of your mod.
- Open a workspace (World -> Open -> Workspace)
- paste into the workspace:
ScratchFrameMorph readSkinFrom: (FileDirectory default directoryNamed: 'ScratchSkin')
- select that text
- right-click and click 'do it'
- open a new Scratch frame (World -> Open -> Scratch)
- check all the features
- if everything works, save the scratch image.
Offline
LS97 wrote:
Treat others as you would like to be treated -Paddle2See
I doubt Paddle2See was the first to make that up lol
Offline
midnightleopard wrote:
LS97 wrote:
Treat others as you would like to be treated -Paddle2See
I doubt Paddle2See was the first to make that up lol
He could have been the first to say it with a smilie though.
Offline
climber59 wrote:
midnightleopard wrote:
LS97 wrote:
Treat others as you would like to be treated -Paddle2See
I doubt Paddle2See was the first to make that up lol
He could have been the first to say it with a smilie though.
Not just a smile - a smile EMOTICON!
Offline
LS97 wrote:
The link block
Ok, finally some time to add the greatest block of all. the block links the user to a webpage, program or file as long as the path or URL is given. add in the blockspecs in the control section some kind of block code (choose whatever you want, you know how to do it). and add in the corresponding instance ops:Code:
Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]So little code for such a great block... and remember to click accept!
Just a little word to the wise. DO NOT PUT THIS BOCK IN A FOREVER or FOREVER IF BLOCK. I did it by accident one time and when the program ran, it shut down my internet. So ( forever - go to www.someplace.com ) works great as a virus, but not as a good script!
Last edited by brantsmith (2010-06-19 22:11:52)
Offline
midnightleopard wrote:
LS97 wrote:
Treat others as you would like to be treated -Paddle2See
I doubt Paddle2See was the first to make that up lol
Paddle2See pioneered it on Scratch though...
Offline
brantsmith wrote:
LS97 wrote:
The link block
Ok, finally some time to add the greatest block of all. the block links the user to a webpage, program or file as long as the path or URL is given. add in the blockspecs in the control section some kind of block code (choose whatever you want, you know how to do it). and add in the corresponding instance ops:Code:
Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]So little code for such a great block... and remember to click accept!
Just a little word to the wise. DO NOT PUT THIS BOCK IN A FOREVER or FOREVER IF BLOCK. I did it by accident one time and when the program ran, it shut down my internet. So ( forever - go to www.someplace.com ) works great as a virus, but not as a good script!
true. but i bet you didnt know you could actually make viruses in scratch
Offline
ScratchReallyROCKS wrote:
midnightleopard wrote:
LS97 wrote:
Treat others as you would like to be treated -Paddle2See
I doubt Paddle2See was the first to make that up lol
Paddle2See pioneered it on Scratch though...
my sig is just one of many thanks to the thread: The Paddle2See Revolution
Offline
well, not anymore i guess
Offline
johnnydean1 wrote:
whats strtok
strtok is a string function in c useful for splitting a string in substrings..ie you can split the following string "one,two,three" in three separare strings ("one" "two" "three") look at the following link:
http://www.elook.org/programming/c/strtok.html
Pier Andrea.
Offline
so like using a sepearator like in a list
Cheese/Ham/Pepper
can become
Cheese
Ham
Pepper
In a list?
Offline
Can anybody do
____ _________________
| |__| _____ |
| run smalltalk | | |
|___ ________________|
|__|
Offline
@TheSuccessor:
i can try. should be easy.
Offline