nXIII wrote:
Jonathanpb wrote:
billyedward, I have a question: How do you get the blocks you made to work?
Ok, open a system browser, select one of the three scriptable morphs, then select a category to put the function in. Next, delete the text in the bottommost pane and replace it with your method. For example:
openWindow: t1
| window |
window _ SystemWindow new.
window setLabel: t1 asString.
window openInWorld: WorldPress alt + s, and now you can call this method from the blockSpecs
Okay, now I'm on a computer that has Scratch - I tried it, but I couldn't find the section.
Can you please give clearer instructions?
(billyedward, you can help if you want. )
Offline
billyedward wrote:
However, I will make part 2 or three of this guide series explain this.
Why don't you put it all in this topic? Then they're all going to be in a sticky...
Offline
The-Whiz wrote:
Hm... This may sound like a random question, ad it is, but what's the ASCII value of the - (dash) key?
It's U+002D on Windows, sry I don't have a Mac
Offline
The-Whiz wrote:
Hm... This may sound like a random question, ad it is, but what's the ASCII value of the - (dash) key?
2D hex, 45 decimal.
See my post on special characters in the forums to find what they all are:
The number followed by a % is the hex value, and the ones enclosed within &#; is the decimal value.
Offline
uh, im confused. is squeek an OS? im using Windows XP. How do u open the Scratch/Streak window?
Offline
GammaGames wrote:
uh, im confused. is squeek an OS? im using Windows XP. How do u open the Scratch/Streak window?
Although there is a squeak OS, what we are using is simply a program.
It runs much like one, though, with little windows and dialogs, etc.
In order to open the scratch/streak window, click on the gray, and then select 'open,' and then either 'scratch' or 'streak' depending on which one it is.
Offline
wow how do I remember all of that
Offline
Confused again
Which squeak do I open up? When I open it up i get some wierd buttons around it and a blue fading into white background.
I try to get into the scratch source code (just to try) but it's differnt from yours.
Help me please
Offline
Stickman704 wrote:
Confused again
Which squeak do I open up? When I open it up i get some wierd buttons around it and a blue fading into white background.
I try to get into the scratch source code (just to try) but it's differnt from yours.
Help me please
You're using the official release of squeak.
Scratch uses MIT squeak.
Simply use the scratch source code instead of squeak by itself to see everything as it is in this tutorial.
Offline
What happened to your guides about making your own blocks work?
Offline
Jonathanpb wrote:
What happened to your guides about making your own blocks work?
They're still up there:
[open Browser with URL []]
(if<>then[]else[]).
More coming soon!
Offline
billyedward wrote:
Stickman704 wrote:
Confused again
Which squeak do I open up? When I open it up i get some wierd buttons around it and a blue fading into white background.
I try to get into the scratch source code (just to try) but it's differnt from yours.
Help me pleaseYou're using the official release of squeak.
Scratch uses MIT squeak.
Simply use the scratch source code instead of squeak by itself to see everything as it is in this tutorial.
Still don't get it
I downloaded scratch source code and opened the.image file in scratch. It's still differnt to yours.
Last edited by Stickman704 (2010-03-05 02:52:02)
Offline
Okay, you might wanna make a shortcut.
You should make a shortcut that starts MIT's Squeak then loads the .image.
"C:\Program Files\Scratch\Scratch.exe" "Path of .image file here"
Next, when you open it, it should look like this
Last edited by ThePCKid (2010-03-05 08:20:04)
Offline
climber59 wrote:
How do I define variables in custom functions?
If you mean temporary variables, like t2, t3, etc. use this syntax:
method: arg1 name: arg2 ...
| temp1 temp2 temp3 ... |
code.
more code.
...
^ returned
temp1, temp2, and temp3 being the temporary variables.
Offline
billyedward wrote:
Jonathanpb wrote:
What happened to your guides about making your own blocks work?
They're still up there:
[open Browser with URL []]
(if<>then[]else[]).
More coming soon!
Oh, you're using projects?
Those guides aren't helping - I want to make my own blocks, whatever blocks I want, and I want those blocks to work. How do I do that?
Offline
nXIII wrote:
climber59 wrote:
How do I define variables in custom functions?
If you mean temporary variables, like t2, t3, etc. use this syntax:
method: arg1 name: arg2 ...
| temp1 temp2 temp3 ... |
code.
more code.
...
^ returnedtemp1, temp2, and temp3 being the temporary variables.
But how do I give them a value, besides the ones you enter?
Offline
climber59 wrote:
nXIII wrote:
climber59 wrote:
How do I define variables in custom functions?
If you mean temporary variables, like t2, t3, etc. use this syntax:
method: arg1 name: arg2 ...
| temp1 temp2 temp3 ... |
code.
more code.
...
^ returnedtemp1, temp2, and temp3 being the temporary variables.
But how do I give them a value, besides the ones you enter?
Use the one of the following syntaxes:
variable _ value
Note: the underscore shows up as a left-pointing arrow
OR
variable := value
Offline
Jonathanpb wrote:
billyedward wrote:
Jonathanpb wrote:
What happened to your guides about making your own blocks work?
They're still up there:
[open Browser with URL []]
(if<>then[]else[]).
More coming soon!Oh, you're using projects?
Those guides aren't helping - I want to make my own blocks, whatever blocks I want, and I want those blocks to work. How do I do that?
To teach you this, I really have to teach you how to use the whole squeak programming language. (search Google for 'squeak tutorial')
I will, however, make a tutorial explaining the basics of block making.
Offline
How do you force the 'alt,' 'control,' and 'shift' keys into the <key %k pressed> block?
Offline
Scratchguy3 wrote:
How do you force the 'alt,' 'control,' and 'shift' keys into the <key %k pressed> block?
You need to modify the method called asciiFor: in ScriptableScratchMorph's category sensing ops. Add the following lines before ^ -1:
'shift' = t1 ifTrue: [^ 16].
'control' = t1 ifTrue: [^ 17].
'alt' = t1 ifTrue: [^ 18].
Press Alt + s.
Next, modify the method 'keyNames'. Add the following after 'space':
'shift' 'control' 'alt'
And press Alt + s.
Three more options should appear in the key menu, and should work.
Offline
Could you please tell me how to get other keys into the keypressed boolean block, itd really like to be able to use other keys other than the ones we have already.
Offline
markyparky56 wrote:
Could you please tell me how to get other keys into the keypressed boolean block, itd really like to be able to use other keys other than the ones we have already.
Look up one post! XD
Offline