Discuss Scratch

davidkt
Scratcher
1000+ posts

Find and Replace System

Sometimes, I want to replace every instance of one block with another in a project. To do so, I have to manually drag one block out, put the other one in, and so on and so forth, which can be really tedious if you're looking at a huge script.
So… my suggestion is… a Find and Replace system for Scratch! It would have two spots where you can drag in a single block or an entire script. Then you just click the Replace button and ta-da! It could also be brought up using the keyboard shortcut ctrl-f.
Thoughts?

Last edited by Paddle2See (Jan. 20, 2025 23:42:42)

Firedrake969
Scratcher
1000+ posts

Find and Replace System

Support.
jvvg
Scratcher
1000+ posts

Find and Replace System

Support.
ProdigyZeta7
Scratcher
1000+ posts

Find and Replace System

Support. This should also work with groups of blocks, too.
Blueinkproductions
Scratcher
1000+ posts

Find and Replace System

Support
Sonickyle
Scratcher
1000+ posts

Find and Replace System

lel I've already suggested this, but I support anyways,
blob8108
Scratcher
1000+ posts

Find and Replace System

Convert it to text using Kurt, use find/replace on the text, and then convert it back again.
davidkt
Scratcher
1000+ posts

Find and Replace System

blob8108 wrote:

Convert it to text using Kurt, use find/replace on the text, and then convert it back again.
-_- Too much work, I'd rather replace the blocks manually.
ExtremeLogic
Scratcher
500+ posts

Find and Replace System

Support.
Deerleg
Scratcher
1000+ posts

Find and Replace System

Support.
Greatguy123
Scratcher
500+ posts

Find and Replace System

Support. I know how tedious it can get when you end up having to replace all of your ifs with if-elses.
turkey3
Scratcher
1000+ posts

Find and Replace System

Support!!!!!!!!!!!!!!!!!!!!!!!!
PH-zero
Scratcher
100+ posts

Find and Replace System

support
davidkt
Scratcher
1000+ posts

Find and Replace System

Updated, and bump.
davidkt
Scratcher
1000+ posts

Find and Replace System

Updated, and bump.
J54Boat
New Scratcher
1 post

Find and Replace System

Support.
MathlyCat
Scratcher
1000+ posts

Find and Replace System

J54Boat wrote:

Support.
Please don't necropost without adding anything to the discussion.

As for the suggestion at hand.

It seems like a simple enough idea that I wouldn't mind at all if it was added. It would also be quite handy when having to replace a ton of c-blocks.
Invisible_Factory
Scratcher
500+ posts

Find and Replace System

Support. Sometimes I have to duplicate blocks to different sprites and then realized I did something wrong, and then I'd waste 4 minutes replacing everything.
awsome_guy_360
Scratcher
1000+ posts

Find and Replace System

(Nov/23/2020: For clarification, and to avoid any future confusion, this topic has been merged with @davidkt's topic, who created theirs three years before mine. This event occurred on pg.9.)

Alright, so… how do I start this off? XD

I would think a replace ___ with ___ feature would be useful in the Scratch editor, for example:

Credit goes to @QqUuIiNnNn for the image/mockup.

So say you want to replace an option or a boolean on a sprite for a two player game. You've already made the sprite for player one, all you need to do is duplicate the sprite, change the costumes…

Aaaand change the controls, which can be a pain. So I was thinking this is where the shortcut would come in handy:

Replace:
<key [right arrow v] pressed?>
with
<key [d v] pressed?>

The same would work for cap blocks (and of course, the standard Scratch block):

Replace:
when green flag clicked
with
when I receive [message 1 v]

Note:To clarify, the tool will have a block search feature and you'll be able to place multiple blocks.




Last edited by awsome_guy_360 (Feb. 15, 2021 22:00:27)

DominoDragon1
Scratcher
1000+ posts

Find and Replace System

Great idea! This is a feature that many other languages and text editors use. You should also be able to replace groups of blocks, such as:
Replace
<key [up arrow v] pressed?>
With
<<key [up arrow v] pressed?> or <key [w v] pressed?>>

Useful for things like adding wasd to a project.

Powered by DjangoBB