Let's start with simple codes:
self = object using the method
^ = makes a up arrow and is used like a BYOB report block
_ = makes a side arrow (like ->) and sets the variable the arrow is pointing to to what is behind the arrow
# = a selector, used in two main different ways, 1. Like broadcasting to another method. 2. Used in dropdowns before the list of the dropdown, such as #('true' 'false').
would become a dropdown of true and false. (notice the ' before and after a word used so that the browser doesn't think it is trying to go to a method which it will not find and later the code wouldn't have been able to be accepted)
nil = this is like saying '' or 0 but you cannot type in 'nil' or '' or 0 and then see if it is nil otherwise it will be false. EVERY VARIABLE IN THE SOURCE CODE IF NOT SET TO SOMETHING EVER WILL BE NIL.
ifTrue: = a condition, if the code before it is true it will run the code after it (which has to be in []'s)
ifFalse: = a condition, if the code before it is false it will run the code after it (which has to be in []'s)
ifNil: = a condition, if the code before it is nil it will run the code after it (which has to be in []'s)
ifNotNil: = a condition, if the code before it is anything but nil it will run the code after it (which has to be in []'s)
[] = conditional code, if there is a reason why it shouldn't do what is inside the []'s , such as t1 = 3 ifTrue: [^t2]
() = joiner, like the join block, it is needed for things like (sensor shiftPressed) and: ( self = ScriptableScratchMorph) I HAVE NO EXPERIENCE OTHERWISE BUT I KNOW IT IS USED IN VARIOUS WAYS WHICH I CANNOT EXPLAIN, IF YOU CAN EXPLAIN PLEASE DO.
Float = will make a word not the word itself but like nil is not 'nil' the word will not be equal to it, such as Float Infinity or Float PiNow I will tell you where you can do what:
blockSpecs = where you can code what a block looks like
ScriptableScratchMorph = where you code blocks for SPRITES AND THE STAGE
ScriptableSpriteMorph = where you can code blocks for SPRITES ONLY
ScriptableStageMorph = where you can code blocks for the STAGE ONLY
Scratch-Blocks = where you will code new type of blocks and/or dropdowns which later you can use in blockSpecs
Scratch-Objects = where you code things for Objects such as blocks
Scratch-UI-Panes = where you can put codes for the top of your Scratch window, such as menus like the Edit or Share menu
Scratch-UI-Watchers = where you can edit how a reporter shows in the stage
Here are a few things you can do with Scratch:
Mesh = a connection between two different Scratch window (even if they are on different computers!) ONLY WORKS SHORT DISTANCE
Code A Block = is when you make a block that will be in the blocks pane
Get Things From The Internet = Scratch can get things from the internet without opening an internet browser as seen in some Scratch Modifications
Open The Internet = Scratch can open your default internet browser
Make A Method Or Block = Scratch allows you to make a code that allows you to make your own method and/or block which will save for that project only.
Change The Color Of ANYTHING = Change the color of blocks, watchers, buttons, panes and more!
Open Other Programs = Scratch can open any program installed to your computer, such as paint, word, ITunes and more!
Make A Mod = About 50 Scratch Modifications have already been made!
Change Files On Your Computer = with Scratch you can make a code which can change and/or create a file on your computer! As seen in some Mods
More! = If you can code it, you can use it!
Last edited by Pecola1 (2011-04-10 18:18:42)
Offline
Here are a few things you need to fix:
BBCode does not work inside the [code] tag.
Scratch-Blocks is where you make dropdown menus and new block types.
The Mesh link is broken, take out the http// and replace with http://.
Overall, nice guide!
Offline
scimonster wrote:
Here are a few things you need to fix:
BBCode does not work inside the [code] tag.
Scratch-Blocks is where you make dropdown menus and new block types.
The Mesh link is broken, take out the http// and replace with http://.
Overall, nice guide!
Actually the Mesh had a space before it. I know about the bbcode tag thing, I edited it but accidentally didn't save it. What about the Scratch-Blocks
Offline
Pecola1 wrote:
scimonster wrote:
Here are a few things you need to fix:
BBCode does not work inside the [code] tag.
Scratch-Blocks is where you make dropdown menus and new block types.
The Mesh link is broken, take out the http// and replace with http://.
Overall, nice guide!Actually the Mesh had a space before it. I know about the bbcode tag thing, I edited it but accidentally didn't save it. What about the Scratch-Blocks
You wrote Scratch-Objects.
Offline
scimonster wrote:
Pecola1 wrote:
scimonster wrote:
Here are a few things you need to fix:
BBCode does not work inside the [code] tag.
Scratch-Blocks is where you make dropdown menus and new block types.
The Mesh link is broken, take out the http// and replace with http://.
Overall, nice guide!Actually the Mesh had a space before it. I know about the bbcode tag thing, I edited it but accidentally didn't save it. What about the Scratch-Blocks
You wrote Scratch-Objects.
OH! LOL sorry about that.
Offline
6jarjar6 wrote:
<font color=red>text goes here</font>
What? Use BBcode:
[color=red]text goes here[/color]
will appear text goes here
Offline
pen13 wrote:
text goes here
What about it?
Offline
Pecola1 wrote:
ifTrue: = a condition, if the code behind it is true it will run the code after it (which has to be in []'s)
I suggest that everytime you say "behind", you replace it with "before".
I mean, in the word CAT, is the A behind the C or the C behind the A?
this confused me at first. you should change it.
Offline
DarthPickley wrote:
Pecola1 wrote:
ifTrue: = a condition, if the code behind it is true it will run the code after it (which has to be in []'s)
I suggest that everytime you say "behind", you replace it with "before".
I mean, in the word CAT, is the A behind the C or the C behind the A?
this confused me at first. you should change it.
Thank you! I just thought that before, can also mean in front of. But I do believe it would be less confusing.
Offline
How do you let Scratch open other programs?
Offline
PythonLibrary wrote:
How do you let Scratch open other programs?
I think it is something like:
Cursor wait showWhile: [ScratchPlugin primOpen: t1]
I don't quite remember.
Offline
By only works short distance, I think you mean LAN.
Offline
LiquidMetal wrote:
By only works short distance, I think you mean LAN.
I don't quite understand... what is by and LAN?
Offline
Pecola1 wrote:
LiquidMetal wrote:
By only works short distance, I think you mean LAN.
I don't quite understand... what is by and LAN?
LAN is Local Area Network.
Offline
scimonster wrote:
Pecola1 wrote:
LiquidMetal wrote:
By only works short distance, I think you mean LAN.
I don't quite understand... what is by and LAN?
LAN is Local Area Network.
and whats By?
Offline
Pecola1 wrote:
scimonster wrote:
Pecola1 wrote:
I don't quite understand... what is by and LAN?LAN is Local Area Network.
and whats By?
I don't know. I was just translating the acronym. XD
Offline
scimonster wrote:
Pecola1 wrote:
scimonster wrote:
LAN is Local Area Network.and whats By?
I don't know. I was just translating the acronym. XD
LOL so LAN may be something else? Or is that what he is talking about?
Offline
Pecola1 wrote:
scimonster wrote:
Pecola1 wrote:
and whats By?I don't know. I was just translating the acronym. XD
LOL so LAN may be something else? Or is that what he is talking about?
That's what he's talking about, I'm pretty sure.
Offline
[color=light gray]hi[/color]
Offline
Pecola1 wrote:
PythonLibrary wrote:
How do you let Scratch open other programs?
I think it is something like:
Cursor wait showWhile: [ScratchPlugin primOpen: t1]
I don't quite remember.
so does that means you declare t1 as a temp like this:
| t1 |
t1 _ Path goes here
Cursor wait showWhile: [ScratchPlugin primOpen: t1]
and for the web browser you do primOpenURL: t1 instead of primOpen: t1!
I'd rather just do ScratchPlugin primOpen :t1 rather than Cursor wait showWhile: [ScratchPlugin primOpen: t1] because it sets the cursor to wait
Offline