Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Scratch 3.0 Utilities extension
- Sheep_maker
-
1000+ posts
Scratch 3.0 Utilities extension
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:
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>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.
<() \>= (50)::#8BC34A>
<true::#8BC34A>Although unnecessary, it might make your code look cleaner and not have any empty slots or seemingly useless = blocks.
<false::#8BC34A>
(() ^ ()::#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://mv-ezproxy-com.ezproxyberklee.flo.org/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.
- Jeffalo
-
1000+ posts
Scratch 3.0 Utilities extension
will this work when scratch 3 come out???
it very cool and make me happy
thank you,
jeffalo
it very cool and make me happy
thank you,
jeffalo
- Sheep_maker
-
1000+ posts
Scratch 3.0 Utilities extension
I can't guarantee it, but I'll try to update it if anything changes. I'd also have to get it approved by the ST before you can use it in your projects. will this work when scratch 3 come out???
it very cool and make me happy
thank you,
jeffalo
- LuckyLucky7
-
1000+ posts
Scratch 3.0 Utilities extension
I have found a bug in the mod.
The ‘Add Extension’ button slightly overlaps where it's not supposed to.
The ‘Add Extension’ button slightly overlaps where it's not supposed to.
- Sheep_maker
-
1000+ posts
Scratch 3.0 Utilities extension
Clicking on reporters in a custom extension seems to constantly report the value and can only be stopped by pressing the stop button; I will look into this.
That should be fixed now.
I updated the GUI in a state where they were in the middle of widening the category sidebar I have found a bug in the mod.
The ‘Add Extension’ button slightly overlaps where it's not supposed to.

- LuckyLucky7
-
1000+ posts
Scratch 3.0 Utilities extension
Yep, it's fixed! Clicking on reporters in a custom extension seems to constantly report the value and can only be stopped by pressing the stop button; I will look into this.I updated the GUI in a state where they were in the middle of widening the category sidebar I have found a bug in the mod.
The ‘Add Extension’ button slightly overlaps where it's not supposed to.That should be fixed now.
- ronsid
-
100+ posts
Scratch 3.0 Utilities extension
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.yeah? I made an extension for Scratch 3.0 which you can try out
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>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.
<() \>= (50)::#8BC34A><true::#8BC34A>Although unnecessary, it might make your code look cleaner and not have any empty slots or seemingly useless = blocks.
<false::#8BC34A>(() ^ ()::#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://mv-ezproxy-com.ezproxyberklee.flo.org/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.
- ScratchDiogoh
-
1000+ posts
Scratch 3.0 Utilities extension
Suggestions:
move all blocks to operators
to remove
the blocks are updating themselves
unlike kept blocks
move all blocks to operators
to remove
current millisecond ::#8BC34A reporterto fit with the block:
(current [milisecond v])Errors:
the blocks are updating themselves
unlike kept blocks
Last edited by ScratchDiogoh (July 23, 2018 14:40:01)
- Sheep_maker
-
1000+ posts
Scratch 3.0 Utilities extension
Suggestions:The purpose of this extension is to be an extension, not a Scratch 3.0 mod.
move all blocks to operators
to removecurrent millisecond ::#8BC34A reporterto fit with the block:(current [milisecond v])
Errors:I am aware of this issue; I will look into it eventually.
the blocks are updating themselves
unlike kept blocks
- ScratchFoxBot
-
3 posts
Scratch 3.0 Utilities extension
(get content from [https://mv-ezproxy-com.ezproxyberklee.flo.org/users/griffpatch/messages/count]::#8BC34A)This one doesn't seem to work. Is it supposed to be working?
It might have to do with async vs sync stuff
Edit: The problem is CORS blocking**
If you have problems with this, use CORS Anywhere or try making sure your link has https instead of http
Last edited by ScratchFoxBot (Dec. 21, 2018 04:42:32)
- XayCraft360
-
100+ posts
Scratch 3.0 Utilities extension
Bug:
the () >= () and () <= () doesn't expand the values to be the same, thus not accurate
the () >= () and () <= () doesn't expand the values to be the same, thus not accurate
Last edited by XayCraft360 (Dec. 22, 2018 14:00:09)
- JGames101
-
100+ posts
Scratch 3.0 Utilities extension
I've noticed with every Scratch 3 Extension I have tried, that if you put custom reporters in another block, like
The same thing happens with a boolean block, in an if block:
Like I said, this issue isn't exclusive to your extension, but it does affect it.
((pi::#8BC34A) + (current millisecond::#8BC34A)) // Nothing will get returnedIt won't return anything. An error gets logged to the console saying “inputName is null”.
say (pi::#8BC34A) // Nothing will get said
The same thing happens with a boolean block, in an if block:
if <is [apple] extacly [apple]::#8BC34A >then
say [hello] // This won't get run
end
Like I said, this issue isn't exclusive to your extension, but it does affect it.
- SimpleScratch
-
500+ posts
Scratch 3.0 Utilities extension
I've noticed with every Scratch 3 Extension I have tried, that if you put custom reporters in another block, like((pi::#8BC34A) + (current millisecond::#8BC34A)) // Nothing will get returned
say (pi::#8BC34A) // Nothing will get said
Getting the same issue with a Raspberry Pi extension
Clicking directly on reporter gives the correct value but if put inside a say block - nothing gets said
- SimpleScratch
-
500+ posts
Scratch 3.0 Utilities extension
@sheep_maker has updated their site so that the the reporters now work inside other blocks 



- JGames101
-
100+ posts
Scratch 3.0 Utilities extension
Great! @sheep_maker has updated their site so that the the reporters now work inside other blocks
- LuckyLucky7
-
1000+ posts
Scratch 3.0 Utilities extension
I'm just wondering, but is this extension still in development? I would like to see more extensions or more blocks related to this extension.
- Sheep_maker
-
1000+ posts
Scratch 3.0 Utilities extension
Not really since I'm not sure what else to add that non-core extensions can do, but I've recently synced up my mod to the latest Scratch version I'm just wondering, but is this extension still in development? I would like to see more extensions or more blocks related to this extension.
- LuckyLucky7
-
1000+ posts
Scratch 3.0 Utilities extension
Wait, can you link me to the mod(unless you are taking about syncing this extension)?Not really since I'm not sure what else to add that non-core extensions can do, but I've recently synced up my mod to the latest Scratch version I'm just wondering, but is this extension still in development? I would like to see more extensions or more blocks related to this extension.
- Sheep_maker
-
1000+ posts
Scratch 3.0 Utilities extension
Wait, can you link me to the mod(unless you are taking about syncing this extension)?https://sheeptester.github.io/scratch-gui/
Load an extension from a URL from the extensions library or by adding ?url=extension_url to the URL
- LuckyLucky7
-
1000+ posts
Scratch 3.0 Utilities extension
I think you mean syncing the editor to the latest version.Wait, can you link me to the mod(unless you are taking about syncing this extension)?https://sheeptester.github.io/scratch-gui/
Load an extension from a URL from the extensions library or by adding ?url=extension_url to the URL
- Discussion Forums
- » Developing Scratch Extensions
-
» Scratch 3.0 Utilities extension