YourLocalBlockLib wrote:
. http://welcometoyourlocalblocklibrary.w … 223741.gif
Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0
Other updates: [0]
Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archive
WHAT?! so you added theirs, not mine?!
Offline
TuragaTreeko wrote:
pokemongardevoir wrote:
SSBBM wrote:
Scratch, BYOB, or Panther blocks?Scratch, I think. (The open URL block)
Okay, go to blockspecs. This is where you confirm the block exists, and you tell what it looks like. You also name the action it does.
for the URL block, I would do this (this is the blockspecs scimonster gave me):
('open URL: %s' #- #doOpen: )
the part in quotes is what the block says on it. the %s is a place for a string. #- means it is a stack block. #doOpen names the action open.
right click and choose accept, and go to instance. under other ops, replace the code of the broadcast with
open: t1
cursor wait showWhile ScratchPlugin primOpen URL: t1
or something like that. I think there is actually a bracket in there somewhere. anywho, that is how you code a block.
Oh, and awesome username (gardevoir is one of my faves -- treecko is my absolute favorite).
How do you get blockspecs? I'm terrible at this!
Offline
pokemongardevoir wrote:
How do you get blockspecs? I'm terrible at this!
In order to do Scratch blocks you must hack Scratch. Even some advanced Scratchers don't know how to add blocks to Scratch. If you don't want to go though to much trouble I would recommend downloading BYOB or Panther; they both have great block makers.
Last edited by SSBBM (2011-06-17 21:00:10)
Offline
I did the untested import thing... how do i download a block now?
Offline
SSBBM wrote:
pokemongardevoir wrote:
How do you get blockspecs? I'm terrible at this!
In order to do Scratch blocks you must hack Scratch. Even some advanced Scratchers don't know how to add blocks to Scratch. If you don't want to go though to much trouble I would recommend downloading BYOB or Panther; they both have great block makers.
I think i'll be good if i just know how to download a block since i did the untested import thing.
Offline
jslomba wrote:
YourLocalBlockLib wrote:
. http://welcometoyourlocalblocklibrary.w … 223741.gif
Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0
Other updates: [0]
Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archiveWHAT?! so you added theirs, not mine?!
I didn't have time to add them all, and since yours were at the bottom of the queue, they didn't get added. I'll do another update now.
Offline
TheSuccessor wrote:
jslomba wrote:
YourLocalBlockLib wrote:
. http://welcometoyourlocalblocklibrary.w … 223741.gif
Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0
Other updates: [0]
Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archiveWHAT?! so you added theirs, not mine?!
I didn't have time to add them all, and since yours were at the bottom of the queue, they didn't get added. I'll do another update now.
k, thanks
Offline
sparks wrote:
the untested import thing currently does not work because we haven't worked out now to get our blocks to work with it yet... Sorry!
Oh...
Offline
DROPDOWN VERSION:
Blockspec:
('%n %X %n' #r #workOut:with:to:)
Code:
workOut: t1 with: t2 to: t3
t2 = '+' ifTrue: [^ t1 + t3].
t2 = 'minus' ifTrue: [^ t1 - t3].
t2 = '*' ifTrue: [^ t1 * t3].
t2 = '/' ifTrue: [^t1 / t3].
^ 'Error!'
uncoloredArgMorph:
$X = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #opNames;
choice: '+'].
code2:
opNames
^ #('+' 'minus' '*' '/' )
Last edited by jslomba (2011-06-18 09:32:58)
Offline
TheSuccessor wrote:
jslomba wrote:
YourLocalBlockLib wrote:
. http://welcometoyourlocalblocklibrary.w … 223741.gif
Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0
Other updates: [0]
Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archiveWHAT?! so you added theirs, not mine?!
I didn't have time to add them all, and since yours were at the bottom of the queue, they didn't get added. I'll do another update now.
any minute now.....
Offline
jslomba wrote:
TheSuccessor wrote:
jslomba wrote:
WHAT?! so you added theirs, not mine?!I didn't have time to add them all, and since yours were at the bottom of the queue, they didn't get added. I'll do another update now.
any minute now.....
still waiting....
Offline
YourLocalBlockLib wrote:
. http://welcometoyourlocalblocklibrary.w … 223741.gif
Scratch blocks added: [11]
get first () characters of []
get last () of []
get letters () to () of []
[] () times
Arrow key move with speed ()
Switch the up/down value of the pen
Number of costumes
Switch whether hidden or shown
Get the name of costume number ()
Am I on [costume] ? All by Hardmath123
beep By meew0
Other updates: [0]
Update carried out by block librarian: TheSuccessor
________________________________________________________________________________
^home
^updates archive
Why didn't you do block images?
Offline
blockspec:
('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')
code:
Userlink: user
Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]
Offline
jslomba wrote:
http://megamod.weebly.com/uploads/7/1/5 … 181233.gif
blockspec:
('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')
code:
Userlink: user
Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]
Wasn't that TuragaTreeko's block?
Offline
scimonster wrote:
jslomba wrote:
http://megamod.weebly.com/uploads/7/1/5 … 181233.gif
blockspec:
('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')
code:
Userlink: user
Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]Wasn't that TuragaTreeko's block?
oh, it alredy exists? -.- sorry
Offline
jslomba wrote:
http://megamod.weebly.com/uploads/7/1/5 … 181233.gif
blockspec:
('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')
code:
Userlink: user
Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]
Hey, I was working on that block!!! Except mine was all buggy. (I forgot brackets, commas, and quotes )
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'http://www.weebly.com/uploads/5/4/1/3/5 … 966431.png
http://www.weebly.com/uploads/5/4/1/3/5 … 435385.png
um... okay... got the keys to exist. but they don't actually sense that the keys are pressed.
Offline
TuragaTreeko wrote:
Pecola1 wrote:
...
um... okay... got the keys to exist. but they don't actually sense that the keys are pressed.
Did you change asciiFor:?
Offline
jslomba wrote:
jslomba wrote:
any minute now.....
still waiting....
Sorry, I had to go. I will do it now though.
Offline
blockspecs:('set the variable watcher color to %c' #- #setVariableWatcherColorSelf:)
Code:setVariableWarcherColorSelf: t1
VariableWatcherColor _ t1
Now both lists and variables can be pretty looking!
Also, I adapted this from Panther.
blockspecs:('open dialog %s with text %s' #- #doShowInformDialog:withText:)
Code:doShowInformDialog: t1 withText: t2
DialogBoxMorph inform: t2 title: t1
Oh and here's another...
blockspecs: ('add comment to script' #- #doAddComment:)
This one doesn't require code, as it simply taps into the existing code for adding a comment.
Last edited by TuragaTreeko (2011-06-19 09:04:09)
Offline
Pecola1 wrote:
TuragaTreeko wrote:
Pecola1 wrote:
...
um... okay... got the keys to exist. but they don't actually sense that the keys are pressed.
Did you change asciiFor:?
yes. also keynames.
Offline