Discuss Scratch

Sheep_maker
Scratcher
1000+ posts

Scratch 3.0 Utilities extension

WA3360 wrote:

when this sprite clicked
go to [ youtube.com]
Can't do that with unofficial extensions since they're sandboxed in web workers

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
AnAlgorithm
Scratcher
85 posts

Scratch 3.0 Utilities extension

Well…I guess ‘millisecond’ should go in the ‘Sensing’ part. Seems good.
(current [millisecond v])



- @AnAlgorithm

This is my signature. It comes below every post I make.
To see my full signature, select this text and press Shift+Down arrow.


Check out my projects:



☠️ eaten by an evil kumquat…


;
WaterGames7216_
Scratcher
24 posts

Scratch 3.0 Utilities extension

Can I suggest blocks?
It's fine if you do not want me to.

Why hello there! I go by the name of WaterGames7216_. Feel free to give me feedback, my good kumquats will protect you and not bite.

Profile
My Lounge

(TwU)
This is Bob. Bob always does Bob stuff. He is always going to be a Bob. Never disrespect Bob.
SuperSean12
Scratcher
500+ posts

Scratch 3.0 Utilities extension

speech to text?

@SuperSean12
forum translator
among us player
meme lover (not animation memess)
WaterGames7216_
Scratcher
24 posts

Scratch 3.0 Utilities extension

What about a

(round () to the nearest ()::#8BC34A)

I know its easily workaroundable, but would be nice to have.
Here is an example

(round (9.4) to the nearest (10)::#8BC34A)

The answer would be 9.0.

Last edited by WaterGames7216_ (Sept. 16, 2020 14:44:50)


Why hello there! I go by the name of WaterGames7216_. Feel free to give me feedback, my good kumquats will protect you and not bite.

Profile
My Lounge

(TwU)
This is Bob. Bob always does Bob stuff. He is always going to be a Bob. Never disrespect Bob.
bjmoore2007
Scratcher
32 posts

Scratch 3.0 Utilities extension

can i suggest an block ? it would compare an variable to 2 or more lists and then tell the name of the list the variable belongs too by either using AI or counting the letters in each item of the list that match with the variables letters and then comparing it too other lists

when I receive [ wake_up]
if <i am nice= true> then
set [ lets be nice ] to [yeeess]
end


lets all be nice
Sheep_maker
Scratcher
1000+ posts

Scratch 3.0 Utilities extension

bjmoore2007 wrote:

can i suggest an block ? it would compare an variable to 2 or more lists and then tell the name of the list the variable belongs too by either using AI or counting the letters in each item of the list that match with the variables letters and then comparing it too other lists
Hmm, I have a feeling this can already be done without AI. You can use the
<[list v] contains [thing] ?>
block to determine if a variable is in a specific list. You can then use if/else blocks to determine which list has the variable's value

I'm not exactly sure how the name of the list would be useful though because you can't plug the name into a list dropdown, I think

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
bjmoore2007
Scratcher
32 posts

Scratch 3.0 Utilities extension

i mean it would determine the percentage of equal letters like for example (fish) compared to list (dish)(nice) and list(cart)(mine) wold display list (dish) (nice) because dish and nice all have an total of 4 equal letters and cart mine only one equal letter

when I receive [ wake_up]
if <i am nice= true> then
set [ lets be nice ] to [yeeess]
end


lets all be nice
RichieNB
Scratcher
71 posts

Scratch 3.0 Utilities extension

bjmoore2007 wrote:

i mean it would determine the percentage of equal letters like for example (fish) compared to list (dish)(nice) and list(cart)(mine) wold display list (dish) (nice) because dish and nice all have an total of 4 equal letters and cart mine only one equal letter

Using leven to find the percentage of equal letters between 2 words:

(a, b) => (a.length + b.length - (leven(a, b) * 2)) / (a.length + b.length)

For people starting out building Scratch Extensions, I created a simple boilerplate that integrates Typescript and a build toolchain to help streamline the extension development experience.

I'm also working on a tool that automatically packages Scratch projects for offline use and creates a PWA.
bjmoore2007
Scratcher
32 posts

Scratch 3.0 Utilities extension

wow thx i did not now this bevore so let me do more research

Last edited by bjmoore2007 (Dec. 29, 2020 01:55:33)


when I receive [ wake_up]
if <i am nice= true> then
set [ lets be nice ] to [yeeess]
end


lets all be nice
johnelr
Scratcher
1000+ posts

Scratch 3.0 Utilities extension

Sheep_maker wrote:

I made an extension for Scratch 3.0 which you can try out here. It adds a few blocks, many of which are workaroundable, but still nice to have. They are all reporter/boolean blocks because currently extensions loaded from a URL can't access the rest of Scratch.

The blocks are current sorted in an arbitrary order:
<is [apple] exactly [APPLE]?::#8BC34A>
Case sensitive string comparison. It can also distinguish between different types (eg a number created from a + block vs a join block)

<() \<= (50)::#8BC34A>
<() \>= (50)::#8BC34A>
I didn't use the special unicode characters because Scratch tends to use keyboard-only characters, as shown in the * and / blocks. The second input is 50 because the built in <, =, and > blocks follow this behaviour, a change in Scratch 3.0. They only support numbers, unlike the built in comparison blocks.

<true::#8BC34A>
<false::#8BC34A>
Although unnecessary, it might make your code look cleaner and not have any empty slots or seemingly useless = blocks.

(() ^ ()::#8BC34A)
I would probably have worded this as “to the power of” instead, but it's usually put as ^ on the Suggestions forums.

(pi::#8BC34A)
This reporter is often suggested on the suggestions forums.

(if <> then [banana] else [apple]::#8BC34A)
The ternary operator. The default strings are based off the new default values for the join block.

(letters (5) to (7) of [red apple]::#8BC34A)
The indices start from 1 and are inclusive, because I feel like they're more intuitive for beginners (they're used for page numbers, for example).

(current millisecond::#8BC34A)
This is also often suggested. I think it returns an integer between 0 and 999.

(get content from [https://api.scratch.mit.edu/users/griffpatch/messages/count]::#8BC34A)
I am using a page that doesn't output a very large string, yet is on Scratch. I chose griffpatch because he almost always has a nonzero message count.

([fruit/apples] of [{"fruit": {"apples": 2, "bananas": 3}, "total_fruit": 5}]::#8BC34A)
Parses the JSON and outputs the object at that path. If there's nothing at that path, then it returns an empty string. If there's an object, it returns the JSON of the object. I don't think the block is very intuitive, and it can be worded better. However, it will help beginners learn about the uses of the previous block.

<[true]::#8BC34A>
Not very intuitive; it literally just returns what you put in. However, it's a boolean reporter, so you can use it to put variables in if blocks:
if <(game running?)::#8BC34A> then
...
end

(replace [bananas are awesome. i like bananas.] using the rule [banana] with [apple]::#8BC34A)
Uses regex to replace the string (the second input is the regex). The replacement is unfortunately case insensitive, which I feel will better fit the other Scratch blocks. You can replace captured groups using $n.
i added true and false booleans and pi reporters in my extension

johnelr
Stamps (click) ->

johnelr
Scratcher
1000+ posts

Scratch 3.0 Utilities extension

set [variable v] to (get html from [https://example.com])

johnelr
Stamps (click) ->

Cool_puppy28
Scratcher
8 posts

Scratch 3.0 Utilities extension

Hallo. This is cool
Hypercrafter200
Scratcher
5 posts

Scratch 3.0 Utilities extension

I found a bug, the block below won't report anything
(get content from [(join [https://api.scratch.mit.edu/users/] (join (your username here) [/messages/count])::#8BC34A)
can you fix it?

celleron56
Scratcher
89 posts

Scratch 3.0 Utilities extension

this is very cool (could you try to add a add / replace (item in json) ) and try to get it approved by the ST because i really want this in scratch


Sheep_maker
Scratcher
1000+ posts

Scratch 3.0 Utilities extension

Hypercrafter200 wrote:

I found a bug, the block below won't report anything
(get content from [(join [https://api.scratch.mit.edu/users/] (join (your username here) [/messages/count])::#8BC34A)
can you fix it?
For security reasons, websites by default do not let other web pages from getting their content; this is called the CORS policy

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
JJ09012011
Scratcher
100+ posts

Scratch 3.0 Utilities extension

Wow, the blocks are useful for my games.

I am a dog that wants to take over Scratch.

Profile: Scratch Dog
Full name: Godly Grandpa Doggy The Angel
Birth date: 15 May 2007
Favourite project: Scratch Cat will be mad when he sees this…
Favourite Scratcher: This dog that supports me…
Favourite block:
turn [cats v] into [dogs v] :: #fc0366

Of course I am not plotting to take over Scratch! Relax!
Astro202
Scratcher
82 posts

Scratch 3.0 Utilities extension

NICE!!!!!!

Want a vacation idea? Click here!, click here for its scratch version/guide and if you want to save the earth, click here!
0znzw
Scratcher
83 posts

Scratch 3.0 Utilities extension

ygi7d5u6dtifuygio;ilu6y5t4syedtrfykguh

驗ꍬ
thewolfydude4313
Scratcher
9 posts

Scratch 3.0 Utilities extension

0znzw wrote:

ygi7d5u6dtifuygio;ilu6y5t4syedtrfykguh
* did you type
learn to type perfectly
im not a bully btw

Powered by DjangoBB