meew0 wrote:
Click in the white area to open the world menu
Superspeed76 wrote:
Where in the white area? Which white area? I still can't find the world menu! I'm stopped from this "Legalized Hack" like a [blocks] <stop all> [/blocks] block!!! Please get more in depth!
Offline
Superspeed76 wrote:
meew0 wrote:
Click in the white area to open the world menu
Superspeed76 wrote:
Where in the white area? Which white area? I still can't find the world menu! I'm stopped from this "Legalized Hack" like a [blocks] <stop all> [/blocks] block!!! Please get more in depth!
Shift click on the curve in the 'R' in the scratch logo, click turn full screen off, then click on the white space that appears.
Offline
markyparky56 wrote:
Superspeed76 wrote:
meew0 wrote:
Click in the white area to open the world menu
Superspeed76 wrote:
Where in the white area? Which white area? I still can't find the world menu! I'm stopped from this "Legalized Hack" like a [blocks] <stop all> [/blocks] block!!! Please get more in depth!
Shift click on the curve in the 'R' in the scratch logo, click turn full screen off, then click on the white space that appears.
Superspeed76 wrote:
2 things, 1 I did that already, and 2 my problems won't be so bad anymore- I just found it!
Offline
nXIII wrote:
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.
Okay, let's get started: the FULL key pressed block tutorial:
First, let's see which keys we want to include:
Note: Some of these only apply to windows OS's.Keys and Their ASCII
shift : 16
control (ctrl) : 17
alt : 18
enter : 13
backspace : 8
num lock : 144*
caps lock : 20
scroll lock : 145*
pause break : 3*
print screen : 44*
delete (del) : 46*
insert (ins) : 45*
home : 36*
end : 35*
page up : 33*
page down : 34*
left windows : 91
right window : 92
Function keys : 112-123**
Escape : 27
* I have tested these and they do not work due to them being harvested by other processes; the sensor does not receive them.
** f2 returns false until pressed but does not return false after that point. I have chosen not to include it.OK, on to the code editing:
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].
'backspace' = t1 ifTrue: [^ 8].
'caps lock' = t1 ifTrue: [^ 20].
'left windows' = t1 ifTrue: [^ 91].
'right windows' = t1 ifTrue: [^ 92].
'f1' = t1 ifTrue: [^ 112].
'f3' = t1 ifTrue: [^ 114].
'f4' = t1 ifTrue: [^ 115].
'f5' = t1 ifTrue: [^ 116].
'f6' = t1 ifTrue: [^ 117].
'f7' = t1 ifTrue: [^ 118].
'f8' = t1 ifTrue: [^ 119].
'f9' = t1 ifTrue: [^ 120].
'f10' = t1 ifTrue: [^ 121].
'f11' = t1 ifTrue: [^ 122].
'f12' = t1 ifTrue: [^ 123].
'escape' = t1 ifTrue: [^ 27].Press Alt + s. This saves the changes.
Next, modify the method keyNames. Add the following after 'space':'shift' 'control' 'alt' 'backspace' 'caps lock' 'left windows' 'right windows' 'f1' 'f3' 'f4' 'f5' 'f6' 'f7' 'f8' 'f9' 'f10' 'f11' 'f12' 'escape'
Press Alt + s.
Important Note: You must shift-click the R in the Scratch logo and select save image for end-user to save these changes so they stay in effect next time you use Scratch. Select yes when asked, then reopen Scratch (it should close)
Thank you.
Offline
I know this is kinda dumb to ask since its useless now with the new ScratchCommentMorph, but what is the code for the comment block?
Offline
Ohhhh! I am soooooooooo dumb! I tried making a block and deleted all the Control Blocks by accedent. Please tell me how to fix this!
Offline
whats the blank gray screen on squeak?
Offline
How to make block like forever(with command inserter)?
Offline
Wow. This is some great information!
I'll be using this!
Offline
Epic! I mod scratch all the time now!
Offline
colabcalub wrote:
Ohhhh! I am soooooooooo dumb! I tried making a block and deleted all the Control Blocks by accedent. Please tell me how to fix this!
Replace your scriptableScratchMorph blockspecs with this:
blockSpecs | t1 | t1 _ #('control' ('when %m clicked' #S #-) ('when %k key pressed' #K #-) ('when %m clicked' #M #-) #- ('wait %n secs' #t #wait:elapsed:from: 1) #- ('forever' #c #doForever) ('repeat %n' #c #doRepeat 10) #- ('broadcast %e' #- #broadcast:) ('broadcast %e and wait' #s #doBroadcastAndWait) ('when I receive %e' #E #-) #- ('forever if %b' #c #doForeverIf) ('if %b' #c #doIf) ('if %b' #c #doIfElse) ('wait until %b' #s #doWaitUntil) ('repeat until %b' #c #doUntil) #- ('stop script' #s #doReturn) ('stop all' #- #stopAll) 'operators' ('%n + %n' #r #+ #- #-) ('%n - %n' #r #- #- #-) ('%n * %n' #r #* #- #-) ('%n / %n' #r #/ #- #-) #- ('pick random %n to %n' #r #randomFrom:to: 1 10) #- ('%s < %s' #b #< '' '') ('%s = %s' #b #= '' '') ('%s > %s' #b #> '' '') #- ('%b and %b' #b #&) ('%b or %b' #b #|) ('not %b' #b #not) #- ('join %s %s' #r #concatenate:with: 'hello ' 'world') ('letter %n of %s' #r #letter:of: 1 'world') ('length of %s' #r #stringLength: 'world') #- ('%n mod %n' #r #\\ #- #-) ('round %n' #r #rounded #-) #- ('%f of %n' #r #computeFunction:of: 'sqrt' 10) 'sound' ('play sound %S' #- #playSound:) ('play sound %S until done' #s #doPlaySoundAndWait) ('stop all sounds' #- #stopAllSounds) #- ('play drum %D for %n beats' #t #drum:duration:elapsed:from: 48 0.2) ('rest for %n beats' #t #rest:elapsed:from: 0.2) #- ('play note %N for %n beats' #t #noteOn:duration:elapsed:from: 60 0.5) ('set instrument to %I' #- #midiInstrument: 1) #- ('change volume by %n' #- #changeVolumeBy: -10) ('set volume to %n%' #- #setVolumeTo: 100) ('volume' #r #volume) #- ('change tempo by %n' #- #changeTempoBy: 20) ('set tempo to %n bpm' #- #setTempoTo: 60) ('tempo' #r #tempo) 'motor' ('motor on for %n secs' #t #motorOnFor:elapsed:from: 1) ('motor on' #- #allMotorsOn) ('motor off' #- #allMotorsOff) ('motor power %n' #- #startMotorPower: 100) ('motor direction %W' #- #setMotorDirection: 'this way') 'variables' ('show variable %v' #- #showVariable:) ('hide variable %v' #- #hideVariable:) 'list' ('add %s to %L' #- #append:toList: 'thing') #- ('delete %y of %L' #- #deleteLine:ofList: 1) ('insert %s at %i of %L' #- #insert:at:ofList: 'thing' 1) ('replace item %i of %L with %s' #- #setLine:ofList:to: 1 'list' 'thing') #- ('item %i of %L' #r #getLine:ofList: 1) ('length of %L' #r #lineCountOfList:) ('%L contains %s' #b #list:contains: 'list' 'thing') ). ^ t1 , self obsoleteBlockSpecs
Offline
kittenizator wrote:
How to make block like forever(with command inserter)?
In the block spec, make the second symbol #c instead of #-.
Ie:
('A C-shaped block' #c #aCshapedBlock)
Offline
Do all those blocks in the picture actually work, and can you post the code for them? Also, what's the point of an
(()==())
block? It would be the same as
(()=())
.
Last edited by rubiks_cube_guy238 (2010-06-25 12:35:07)
Offline
climber59 wrote:
How do I define variables in custom functions?
Well, here is the format for a function:
nameOfCommandWithInputsLike: t1 or: input1
"comment about the function"
| temporary variables for function |
actual code here
Offline
I can't find the scratch class!
I'm using the source codee of Scratch 1.4.
Offline
bobbybee wrote:
I can't find the scratch class!
I'm using the source codee of Scratch 1.4.
Here:
1: (if you already know how to open the browser, skip this step) Click on the grey space that appears when you turn fill screen off. Then click 'open' and then click 'browser'. Now you have your browser open.
2: In the upper left pane in the browser, click 'Scratch-Objects'. In the pane to the right of that, click ScriptableScratchMorph. On the bottom of that pane are two choices, class and instance. It will already be selected on instance, so click class. Now, in the next pane, click 'block specs' and in the pane after that, click 'blockSpecs.'
3: now you can edit blocks.
Offline
I can edit and save the blocks, but my changes don't appear when I right-click, open, Scratch.
Offline
bobbybee wrote:
I can edit and save the blocks, but my changes don't appear when I right-click, open, Scratch.
You need to shift click the R in the Scratch logo and turn fill Screen on. Then shift click the R again and click save image for end user.
Offline