Discuss Scratch

CodeComet6161
Scratcher
1000+ posts

Computer Class: Typing

Ok, so we know we have (this):
when [space v] key pressed
and also (this):
if <key [space v] pressed?> then

end
But what if you want to (type words)?
For example if you wanted to type the word ("dog"),
You could do this:
if <key [d v] pressed?> then
if <key [o v] pressed?> then
if <key [g v] pressed?> then
play sound [Woof v] until done
end
end
end
But, that would be (a bit tedious), especially for
(long words) and (sentences). That's why I've
thought of a (solution). Behold (this block):
when () typed
(It's supposed to be a hat block)
and (this sensing block)
if <() typed?> then

end
With this, you can now (type words) and
(sentences) easily. It also (reduces the code)
by (~50%)!
lfg30700
Scratcher
1000+ posts

Computer Class: Typing

Workaround:
when (join()[d o g]) pressed in order
Also,
<() typed>
is too vague.
Does it report true directly after you type the word? Does it report true as you hold down the keys or something? A broadcast recieved boolean is rejected for similar reasons.
CodeComet6161
Scratcher
1000+ posts

Computer Class: Typing

lfg30700 wrote:

Workaround:
when (join()[d o g]) pressed in order
Also,
<() typed>
is too vague.
Does it report true directly after you type the word? Does it report true as you hold down the keys or something? A broadcast recieved boolean is rejected for similar reasons.
That's impossible to make, yes, no, idk,
CodeComet6161
Scratcher
1000+ posts

Computer Class: Typing

wait no its possible

Last edited by CodeComet6161 (June 25, 2025 15:16:52)

CodeComet6161
Scratcher
1000+ posts

Computer Class: Typing

lfg30700 wrote:

Workaround:
when (join()[d o g]) pressed in order
Also,
<() typed>
is too vague.
Does it report true directly after you type the word? Does it report true as you hold down the keys or something? A broadcast recieved boolean is rejected for similar reasons.
(Now hold up! There's a problem with that!)
Because the
when [... v] pressed in order
(MaKey MaKey Extension block) is a (hat block),
You (can not use) the
when I receive [ v]
block with it.
Olimon7661
Scratcher
1000+ posts

Computer Class: Typing

CodeComet6161 wrote:

lfg30700 wrote:

Workaround:
when (join()[d o g]) pressed in order
Also,
<() typed>
is too vague.
Does it report true directly after you type the word? Does it report true as you hold down the keys or something? A broadcast recieved boolean is rejected for similar reasons.
(Now hold up! There's a problem with that!)
Because the
when [... v] pressed in order
(MaKey MaKey Extension block) is a (hat block),
You (can not use) the
when I receive [ v]
block with it.
Workaround:
when I receive [... v]
set [foo v] to (1)

when (join()[d o g]) pressed in order
if <(foo) = (1)> then
...
end
Also, please close your BBCode tags with [/command]

Last edited by Olimon7661 (June 25, 2025 18:01:52)

CodeComet6161
Scratcher
1000+ posts

Computer Class: Typing

oh.

Powered by DjangoBB