comp500 wrote:
EDIT #2: Another one:
http://img151.imageshack.us/img151/3800/keypressed.gif(made by LS97, same forum as above)Code:
keyPressed (Sensor keyPressed: 65) ifTrue: [^ 'a']. (Sensor keyPressed: 66) ifTrue: [^ 'b']. (Sensor keyPressed: 67) ifTrue: [^ 'c']. (Sensor keyPressed: 68) ifTrue: [^ 'd']. (Sensor keyPressed: 69) ifTrue: [^ 'e']. (Sensor keyPressed: 70) ifTrue: [^ 'f']. (Sensor keyPressed: 71) ifTrue: [^ 'g']. (Sensor keyPressed: 72) ifTrue: [^ 'h']. (Sensor keyPressed: 73) ifTrue: [^ 'i']. (Sensor keyPressed: 74) ifTrue: [^ 'j']. (Sensor keyPressed: 75) ifTrue: [^ 'k']. (Sensor keyPressed: 76) ifTrue: [^ 'l']. (Sensor keyPressed: 77) ifTrue: [^ 'm']. (Sensor keyPressed: 78) ifTrue: [^ 'n']. (Sensor keyPressed: 79) ifTrue: [^ 'o']. (Sensor keyPressed: 80) ifTrue: [^ 'p']. (Sensor keyPressed: 81) ifTrue: [^ 'q']. (Sensor keyPressed: 82) ifTrue: [^ 'r']. (Sensor keyPressed: 83) ifTrue: [^ 's']. (Sensor keyPressed: 84) ifTrue: [^ 't']. (Sensor keyPressed: 85) ifTrue: [^ 'u']. (Sensor keyPressed: 86) ifTrue: [^ 'v']. (Sensor keyPressed: 87) ifTrue: [^ 'w']. (Sensor keyPressed: 88) ifTrue: [^ 'x']. (Sensor keyPressed: 89) ifTrue: [^ 'y']. (Sensor keyPressed: 90) ifTrue: [^ 'z']. (Sensor keyPressed: 32) ifTrue: [^ 'space']. (Sensor keyPressed: 1) ifTrue: [^ 'home']. (Sensor keyPressed: 4) ifTrue: [^ 'end']. (Sensor keyPressed: 5) ifTrue: [^ 'insert']. (Sensor keyPressed: 9) ifTrue: [^ 'tab']. (Sensor keyPressed: 11) ifTrue: [^ 'page up']. (Sensor keyPressed: 12) ifTrue: [^ 'page down']. (Sensor keyPressed: 127) ifTrue: [^ 'delete']. ^ 'none'Code:
('key pressed' #r #keyPressed)I'm in a hurry.
Add it to scratch and panther.
W00T! 47 pages!
Last edited by comp500 (2011-01-09 04:01:51)
Offline
comp500 wrote:
comp500 wrote:
EDIT #2: Another one:
http://img151.imageshack.us/img151/3800/keypressed.gif(made by LS97, same forum as above)Code:
keyPressed (Sensor keyPressed: 65) ifTrue: [^ 'a']. (Sensor keyPressed: 66) ifTrue: [^ 'b']. (Sensor keyPressed: 67) ifTrue: [^ 'c']. (Sensor keyPressed: 68) ifTrue: [^ 'd']. (Sensor keyPressed: 69) ifTrue: [^ 'e']. (Sensor keyPressed: 70) ifTrue: [^ 'f']. (Sensor keyPressed: 71) ifTrue: [^ 'g']. (Sensor keyPressed: 72) ifTrue: [^ 'h']. (Sensor keyPressed: 73) ifTrue: [^ 'i']. (Sensor keyPressed: 74) ifTrue: [^ 'j']. (Sensor keyPressed: 75) ifTrue: [^ 'k']. (Sensor keyPressed: 76) ifTrue: [^ 'l']. (Sensor keyPressed: 77) ifTrue: [^ 'm']. (Sensor keyPressed: 78) ifTrue: [^ 'n']. (Sensor keyPressed: 79) ifTrue: [^ 'o']. (Sensor keyPressed: 80) ifTrue: [^ 'p']. (Sensor keyPressed: 81) ifTrue: [^ 'q']. (Sensor keyPressed: 82) ifTrue: [^ 'r']. (Sensor keyPressed: 83) ifTrue: [^ 's']. (Sensor keyPressed: 84) ifTrue: [^ 't']. (Sensor keyPressed: 85) ifTrue: [^ 'u']. (Sensor keyPressed: 86) ifTrue: [^ 'v']. (Sensor keyPressed: 87) ifTrue: [^ 'w']. (Sensor keyPressed: 88) ifTrue: [^ 'x']. (Sensor keyPressed: 89) ifTrue: [^ 'y']. (Sensor keyPressed: 90) ifTrue: [^ 'z']. (Sensor keyPressed: 32) ifTrue: [^ 'space']. (Sensor keyPressed: 1) ifTrue: [^ 'home']. (Sensor keyPressed: 4) ifTrue: [^ 'end']. (Sensor keyPressed: 5) ifTrue: [^ 'insert']. (Sensor keyPressed: 9) ifTrue: [^ 'tab']. (Sensor keyPressed: 11) ifTrue: [^ 'page up']. (Sensor keyPressed: 12) ifTrue: [^ 'page down']. (Sensor keyPressed: 127) ifTrue: [^ 'delete']. ^ 'none'Code:
('key pressed' #r #keyPressed)I'm in a hurry.
Add it to scratch and panther.
W00T! 47 pages!
You have to give the Panther code for it to count.
Offline
Pecola1 wrote:
comp500 wrote:
comp500 wrote:
EDIT #2: Another one:
http://img151.imageshack.us/img151/3800/keypressed.gif(made by LS97, same forum as above)Code:
keyPressed (Sensor keyPressed: 65) ifTrue: [^ 'a']. (Sensor keyPressed: 66) ifTrue: [^ 'b']. (Sensor keyPressed: 67) ifTrue: [^ 'c']. (Sensor keyPressed: 68) ifTrue: [^ 'd']. (Sensor keyPressed: 69) ifTrue: [^ 'e']. (Sensor keyPressed: 70) ifTrue: [^ 'f']. (Sensor keyPressed: 71) ifTrue: [^ 'g']. (Sensor keyPressed: 72) ifTrue: [^ 'h']. (Sensor keyPressed: 73) ifTrue: [^ 'i']. (Sensor keyPressed: 74) ifTrue: [^ 'j']. (Sensor keyPressed: 75) ifTrue: [^ 'k']. (Sensor keyPressed: 76) ifTrue: [^ 'l']. (Sensor keyPressed: 77) ifTrue: [^ 'm']. (Sensor keyPressed: 78) ifTrue: [^ 'n']. (Sensor keyPressed: 79) ifTrue: [^ 'o']. (Sensor keyPressed: 80) ifTrue: [^ 'p']. (Sensor keyPressed: 81) ifTrue: [^ 'q']. (Sensor keyPressed: 82) ifTrue: [^ 'r']. (Sensor keyPressed: 83) ifTrue: [^ 's']. (Sensor keyPressed: 84) ifTrue: [^ 't']. (Sensor keyPressed: 85) ifTrue: [^ 'u']. (Sensor keyPressed: 86) ifTrue: [^ 'v']. (Sensor keyPressed: 87) ifTrue: [^ 'w']. (Sensor keyPressed: 88) ifTrue: [^ 'x']. (Sensor keyPressed: 89) ifTrue: [^ 'y']. (Sensor keyPressed: 90) ifTrue: [^ 'z']. (Sensor keyPressed: 32) ifTrue: [^ 'space']. (Sensor keyPressed: 1) ifTrue: [^ 'home']. (Sensor keyPressed: 4) ifTrue: [^ 'end']. (Sensor keyPressed: 5) ifTrue: [^ 'insert']. (Sensor keyPressed: 9) ifTrue: [^ 'tab']. (Sensor keyPressed: 11) ifTrue: [^ 'page up']. (Sensor keyPressed: 12) ifTrue: [^ 'page down']. (Sensor keyPressed: 127) ifTrue: [^ 'delete']. ^ 'none'Code:
('key pressed' #r #keyPressed)I'm in a hurry.
Add it to scratch and panther.
W00T! 47 pages!You have to give the Panther code for it to count.
ok, but they can change it into panther code.
Offline
Pecola1 wrote:
This is key pressed extra keys.
First go to ScriptableScratchMorph> instance> sensing ops> asciiFor:
add the strip:Code:
'enter' localized = t2 ifTrue: [^ Character cr asciiValue]. 'shift' localized = t2 ifTrue: [^ 16]. 'control' localized = t2 ifTrue: [^ 17]. 'alt' localized = t2 ifTrue: [^ 18]. 'backspace' localized = t2 ifTrue: [^ 8]. 'escape' localized = t2 ifTrue: [^ 27]. 'f1' localized = t2 ifTrue: [^ 112]. 'f3' localized = t2 ifTrue: [^ 114]. 'f4' localized = t2 ifTrue: [^ 115]. 'f5' localized = t2 ifTrue: [^ 116]. 'f6' localized = t2 ifTrue: [^ 117]. 'f7' localized = t2 ifTrue: [^ 118]. 'f8' localized = t2 ifTrue: [^ 119]. 'f9' localized = t2 ifTrue: [^ 120]. 'f10' localized = t2 ifTrue: [^ 121]. 'f11' localized = t2 ifTrue: [^ 122]. 'f12' localized = t2 ifTrue: [^ 123]. 'tab' localized = t2 ifTrue: [^ 9].Then switch to keyNames:
add the stripCode:
'shift' 'control' 'alt' 'backspace' 'escape' 'f1' 'f2' 'f3' 'f4' 'f5' 'f6' 'f7' 'f8' 'f9' 'f10' 'f11' 'f12' 'tab'
i've opened sytem browser but i cant find ScriptableScratchMorph> instance> sensing ops> asciiFor: or keyNames:
help (P.S. ive edited scratch source code befor but i need some help)
Offline
Three things.
One: Does anyone know about a squeak tutorial? I'm interested in learning it, but know nothing.
Two: Would you like me do make some pictures of block requests? EDIT: Too late I did it anyways,
Three: I have a block request.
block name:
distance to x: () y: ()
Requested for:
BYOB
Last edited by SSBBM (2011-01-09 17:51:11)
Offline
sparks wrote:
SSBBM, here's an unfinished squeak tutorial I'm building - feel free to look at it!
guide
Thank you sparks. I looked only looked at the block spec part and so far I get it.
That's not what I meant. I'm looking for a block a lot like the distance to [sprite] block with 1 number.
Oh, and I updated my previous post BTW.
Offline
Offline
bbbeb wrote:
wait a sec, glitched
http://img89.imageshack.us/img89/7056/b … anceto.gif
floppy_gunk wrote:
http://img820.imageshack.us/img820/6180/dist.gif
Here you go!
Thanks both of you. bbbeb, floppy_gunk's block was what I wanted, sorry you misunderstood .
Offline
jcml wrote:
Pecola1 wrote:
This is key pressed extra keys.
First go to Scratch-Objects> ScriptableScratchMorph> instance> sensing ops> asciiFor:
add the strip:Code:
'enter' localized = t2 ifTrue: [^ Character cr asciiValue]. 'shift' localized = t2 ifTrue: [^ 16]. 'control' localized = t2 ifTrue: [^ 17]. 'alt' localized = t2 ifTrue: [^ 18]. 'backspace' localized = t2 ifTrue: [^ 8]. 'escape' localized = t2 ifTrue: [^ 27]. 'f1' localized = t2 ifTrue: [^ 112]. 'f3' localized = t2 ifTrue: [^ 114]. 'f4' localized = t2 ifTrue: [^ 115]. 'f5' localized = t2 ifTrue: [^ 116]. 'f6' localized = t2 ifTrue: [^ 117]. 'f7' localized = t2 ifTrue: [^ 118]. 'f8' localized = t2 ifTrue: [^ 119]. 'f9' localized = t2 ifTrue: [^ 120]. 'f10' localized = t2 ifTrue: [^ 121]. 'f11' localized = t2 ifTrue: [^ 122]. 'f12' localized = t2 ifTrue: [^ 123]. 'tab' localized = t2 ifTrue: [^ 9].Then switch to keyNames:
add the stripCode:
'shift' 'control' 'alt' 'backspace' 'escape' 'f1' 'f2' 'f3' 'f4' 'f5' 'f6' 'f7' 'f8' 'f9' 'f10' 'f11' 'f12' 'tab'i've opened sytem browser but i cant find ScriptableScratchMorph> instance> sensing ops> asciiFor: or keyNames:
help (P.S. ive edited scratch source code befor but i need some help)
Oh! Sorry its Scratch-Objects> ScriptableScratchMorph> instance> sensing ops> asciiFor: I will edit it
Offline
Pecola1 wrote:
Hardmath123 wrote:
Pecola1 wrote:
I know but it also SELECTS different codes like broadcasting. That is how it is used in block specs.So it's like this:
Code:
docodingof: t1 #t1should do the coding of the inout (i.e. 'forward: 10' will make it go forward 10 steps)?
Yes, notice how whoever put on the press green flag used:
Code:
pressGreenFlag #pressGreenFlagButtonBut it didn't work, why? Because it was not in the same class as pressGreenFlagButton. I am not sure exactly how or why but this is what I am pretty sure is true.
BTW great block!
Just found out:
theCode:
docodingof: t1 #t1block will not work because it has to be:
Code:
docodingof: t1 ^#t1but that wont work because the # before t1 makes t1 not the insert, it tries to do t1 instead, even when you make it a reporter it will report t1. I couldn't find a way to fix it .
Arg, I said a SELECTOR is like a STRING! So "^ 't1'" will return 't1' and "^ #t1" will return #t1!
Offline
SSBBM wrote:
bbbeb wrote:
wait a sec, glitched
http://img89.imageshack.us/img89/7056/b … anceto.giffloppy_gunk wrote:
http://img820.imageshack.us/img820/6180/dist.gif
Here you go!Thanks both of you. bbbeb, floppy_gunk's block was what I wanted, sorry you misunderstood .
ok.
Offline
nXIII wrote:
MathWizz wrote:
Arg, I said a SELECTOR is like a STRING! So "^ 't1'" will return 't1' and "^ #t1" will return #t1!
I would suggest self perform: t1.
WERE HAVE YOU BEEEEEEEEEEEEEEEEEEEENNNNN??? [/offtopic] Yes, I know that, but it still is like a string.
Offline
nXIII wrote:
MathWizz wrote:
Arg, I said a SELECTOR is like a STRING! So "^ 't1'" will return 't1' and "^ #t1" will return #t1!
I would suggest self perform: t1.
It's the ghost of nXIII! Back from the dead to haunt all unfinished projects. XD
Offline
sparks wrote:
SSBBM, here's an unfinished squeak tutorial I'm building - feel free to look at it!
guide
I made this.
Offline
Forgotten/Didn't add blocks:
And then the ones here.
I'm going to try to have all the files for the blocks and the pictutres for the ones here (same link as the first one).
Last edited by SSBBM (2011-01-10 18:57:30)
Offline
comp500 wrote:
Pecola1 wrote:
comp500 wrote:
Add it to scratch and panther.
W00T! 47 pages!You have to give the Panther code for it to count.
ok, but they can change it into panther code.
ADD IT!!!!!!!!!!!
Offline
comp500 wrote:
comp500 wrote:
Pecola1 wrote:
You have to give the Panther code for it to count.
ok, but they can change it into panther code.
ADD IT!!!!!!!!!!!
YOU have to change it to panther.
and din't you notice that sparks isn't adding stuff for a little while
Last edited by scimonster (2011-01-11 02:53:37)
Offline
spec:
('save image for end user' #- #saveImmage)
method (other ops):
saveImage
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 saveImageForEndUser
Offline
scimonster wrote:
comp500 wrote:
comp500 wrote:
ok, but they can change it into panther code.ADD IT!!!!!!!!!!!
YOU have to change it to panther.
and din't you notice that sparks isn't adding stuff for a little while
OH.
Offline