The block rush system! There are gonna be a highway of blocks! A planet of blocks! Just post below, and the blocks will go certanly STAT! into the topic.
PLZ do not go what?? please. PLEASE. PLEASE!!!
operators
control
Last edited by zorket (2010-10-06 16:13:24)
Offline
iCode-747 wrote:
My posts and all of the other dude's posts were deleted.
Oh, great.
Good idea, but I thing there is already a thread for this...
Yes, there is one called the block library. This is the stat block highway.
Offline
Operators
(report []) by zorket
blockspec:
('report %s' #r #report: 'hello')
report: t1 ^ t1
What it does: Reports it's contents.
(if <> then () else () by zorket
blockspec:
('if %b then %s else %s' #r #if:then:else:
if: t1 then: t2 else: t3 t1 ifTrue: [^ t2]. ^ t3
What it does: Reports the first string if the boolean is true, the second if false.
<if <> then <> else <> by zorket
blockspec:
('if %b then %b else %b' #b #if:then:else:
if: t1 then: t2 else: t3 t1 ifTrue: [^ t2]. ^ t3
What it does: Reports the second boolean if the first boolean is true, the second if false.
<true> by zorket
blockspec:
('true' #b #reportTrue)
reportTrue ^ true
What it does: Reports true.
<false> by zorket
blockspec:
('false' #b #reportFalse)
reportFalse ^ false
What it does: Reports false.
( (shuffle) (string) ) by zorket
Blockspec:
('%T %s' #r #do:to:)
do: t1 to: t2 t1 = 'reverse' ifTrue: [^ t2 reversed]. t1 = 'shuffle' ifTrue: [^ t2 shuffled]. t1 = 'uppercase' ifTrue: [^ t2 asUppercase]. t1 = 'lowercase' ifTrue: [^ t2 asLowercase]. t1 = 'report' ifTrue: [^ t2].
Scratch blocks> commandBlockMorph> all> uncoloredArgMorphFor: add a strip:
$T = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #mixingNames;
choice: 'reverse'].
Scratch objects> scriptableScratchMorph> LOW then press class> otherOps:
mixingNames
^ #('lowercase' 'uppercase' 'reverse' 'shuffle' 'report' )
What it does: Reports the string by the effect in the dropdown.
back to menu
Last edited by zorket (2010-10-10 17:47:11)
Offline
Control
(get (^) by LS97
Blockspec:
('get %t' #r #getTime: 'date')
getTime: t1
t1 = 'date' ifTrue: [^ Date today].
t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )].
t1 = 'time' ifTrue: [^ Time now].
t1 = 'seconds' ifTrue: [^ Time now seconds].
t1 = 'minutes' ifTrue: [^ Time now minutes].
t1 = 'hours' ifTrue: [^ Time now hours].
t1 = 'weekday' ifTrue: [^ Date today weekday].Code for scratch blocks > command block morph > private > uncolordArgMorphFor: add a strip:
$t = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #timeNames;
choice: ''].Scratch objects > scriptable scratch morph, other ops:
timeNames
^ #('date' 'time' 'short date' 'seconds' 'minutes' 'hours' 'weekday' )What it does: Reports the date or time or short-date, or seconds, minutes, hours, or weekday. All just in a simple drop down. But it uses the computer time.
back to menu
Last edited by zorket (2010-10-10 17:46:47)
Offline
zorket wrote:
Control
(get (^) by zorketBlockspec:
('get %t' #r #getTime: 'date')Code:
getTime: t1 t1 = 'date' ifTrue: [^ Date today]. t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )]. t1 = 'time' ifTrue: [^ Time now]. t1 = 'seconds' ifTrue: [^ Time now seconds]. t1 = 'minutes' ifTrue: [^ Time now minutes]. t1 = 'hours' ifTrue: [^ Time now hours]. t1 = 'weekday' ifTrue: [^ Date today weekday].Code for scratch blocks > command block morph > private > uncolordArgMorphFor: replace all the code with:
Code:
uncoloredArgMorphFor: t1 | t2 | t2 _ t1 at: 2. $a = t2 ifTrue: [^ AttributeArgMorph new choice: 'volume']. $b = t2 ifTrue: [^ BooleanArgMorph new]. $c = t2 ifTrue: [^ ColorArgMorph new showPalette: true]. $C = t2 ifTrue: [^ ColorArgMorph new showPalette: false]. $d = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '0'; menuSelector: #directionMenu]. $D = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '48'; menuSelector: #midiDrumMenu]. $R = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #operatorNames; choice: '+']. $e = t2 ifTrue: [^ EventTitleMorph new]. $f = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #mathFunctionNames; choice: 'sqrt']. $g = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #graphicEffectNames; choice: 'color']. $H = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupSensorNames]. $h = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupBooleanSensorNames]. $I = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #midiInstrumentMenu]. $i = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #listIndexMenu]. $k = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #keyNames; choice: 'space']. $L = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #listVarMenu]. $l = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #costumeNames; choice: 'costume1']. $m = t2 ifTrue: [^ SpriteArgMorph new]. $M = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorNames]. $n = t2 ifTrue: [^ ExpressionArgMorph new numExpression: '10']. $N = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '60'; menuSelector: #noteSelector]. $s = t2 ifTrue: [^ ExpressionArgMorph new stringExpression: '']. $S = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #soundNames; choice: 'pop']. $t = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #timeNames; choice: '']. $v = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #varNamesMenu; choice: '']. $W = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorDirection]. $x = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #sceneNames; choice: '']. $y = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #listIndexForDeleteMenu]. ^ ExpressionArgMorph new numExpression: '10'Scratch objects > scriptable scratch morph, other ops:
Code:
timeNames ^ #('date' 'time' 'short date' 'seconds' 'minutes' 'hours' 'weekday' )What it does: Reports the date or time or short-date, or seconds, minutes, hours, or weekday. All just in a simple drop down. But it uses the computer time.
back to menu
And have you given credit to its creator (LS97 I think)?
Offline
the topic's name made me think it was going to be about blocks that read scratch stats!
Offline
sparks wrote:
the topic's name made me think it was going to be about blocks that read scratch stats!
Same here.
Offline
sparks wrote:
TheSuccessor wrote:
And have you given credit to its creator (LS97 I think)?
Uh... Zorket submitted this block to me in my library under his name... is it done by someone else?
I don'y know who orginaly made it, but I don't think zorket made the original.

Offline
Sperry wrote:
sparks wrote:
TheSuccessor wrote:
And have you given credit to its creator (LS97 I think)?
Uh... Zorket submitted this block to me in my library under his name... is it done by someone else?
I don'y know who orginaly made it, but I don't think zorket made the original.
Oh, I forgot it really was by him. Sorry. Replaced zorket with LS97
I didn't even make the original!
SORRY, SPARKS!!
Last edited by zorket (2010-10-06 17:53:23)
Offline
TheSuccessor wrote:
zorket wrote:
Control
(get (^) by zorketBlockspec:
('get %t' #r #getTime: 'date')Code:
getTime: t1 t1 = 'date' ifTrue: [^ Date today]. t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )]. t1 = 'time' ifTrue: [^ Time now]. t1 = 'seconds' ifTrue: [^ Time now seconds]. t1 = 'minutes' ifTrue: [^ Time now minutes]. t1 = 'hours' ifTrue: [^ Time now hours]. t1 = 'weekday' ifTrue: [^ Date today weekday].Code for scratch blocks > command block morph > private > uncolordArgMorphFor: replace all the code with:
Code:
uncoloredArgMorphFor: t1 | t2 | t2 _ t1 at: 2. $a = t2 ifTrue: [^ AttributeArgMorph new choice: 'volume']. $b = t2 ifTrue: [^ BooleanArgMorph new]. $c = t2 ifTrue: [^ ColorArgMorph new showPalette: true]. $C = t2 ifTrue: [^ ColorArgMorph new showPalette: false]. $d = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '0'; menuSelector: #directionMenu]. $D = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '48'; menuSelector: #midiDrumMenu]. $R = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #operatorNames; choice: '+']. $e = t2 ifTrue: [^ EventTitleMorph new]. $f = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #mathFunctionNames; choice: 'sqrt']. $g = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #graphicEffectNames; choice: 'color']. $H = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupSensorNames]. $h = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupBooleanSensorNames]. $I = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #midiInstrumentMenu]. $i = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #listIndexMenu]. $k = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #keyNames; choice: 'space']. $L = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #listVarMenu]. $l = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #costumeNames; choice: 'costume1']. $m = t2 ifTrue: [^ SpriteArgMorph new]. $M = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorNames]. $n = t2 ifTrue: [^ ExpressionArgMorph new numExpression: '10']. $N = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '60'; menuSelector: #noteSelector]. $s = t2 ifTrue: [^ ExpressionArgMorph new stringExpression: '']. $S = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #soundNames; choice: 'pop']. $t = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #timeNames; choice: '']. $v = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #varNamesMenu; choice: '']. $W = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorDirection]. $x = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #sceneNames; choice: '']. $y = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #listIndexForDeleteMenu]. ^ ExpressionArgMorph new numExpression: '10'Scratch objects > scriptable scratch morph, other ops:
Code:
timeNames ^ #('date' 'time' 'short date' 'seconds' 'minutes' 'hours' 'weekday' )What it does: Reports the date or time or short-date, or seconds, minutes, hours, or weekday. All just in a simple drop down. But it uses the computer time.
back to menuAnd have you given credit to its creator (LS97 I think)?
IT IS DEFINITLY POINTLESS TO REPLY TO A POST OF THE SECTION!!!!!!!!!!!!!!!!!!!!
Offline