Discuss Scratch
- Discussion Forums
- » Suggestions
- » File I/O Blocks
- sk7725
- Scratcher
35 posts
File I/O Blocks
Many projects nowadays have “save codes” which you copy away to save your progress on that game/project. What I am proposing is a File Input/Output Extension/Blocks for Scratch 3.0. Now, i get this will be SUPER Abused if the restrictions are not correct, and also, this suggestion may be similar to https://scratch.mit.edu/discuss/topic/87548/ which suggests Cached Variables, but is also different.
You can import/export lists in Scratch. Try right-clicking the list. It saves into a txt file, \n separating the different elements of the list. Scratch has Cloud Variables, so Lists should have something of their own, which is Filed lists. Rather than making a List fixed as Filed or normal(like Cloud Vars) Lists should have 3 new blocks:
The txt file should have a fixed directory, and only one list can be stored in a device. if the store list block is called twice or more, the stored list would get overwritten. Also when one of these 3 blocks is used for the first time, a notification(like the Cloud var) should say
“Only 64 items in this list will get stored. A stored list may only contain numbers.(optional?) For more information, check HERE.”
I think only 64 items should get stored, each having a 128 digit limit(like the Cloud Var). Also, maybe it should only contain numbers to prevent people writing malicious code and making the first item be “//try changing txt into bat to see what happens!”.
And lastly, the project should alert users like the Username block. Also, should the usage of these blocks be only allowed to Scratches, and not New Scratchers? Note that Cloud Vars are almost as abusable as this suggestion, but people are using it nicely with the proper restrictions!
Here are some optional suggestions for blocks:
These will store the list with an encryption process in the middle.
maybe the encryption should be general blocks:
Sure these can be made with existing blocks, but blocks like these should help New Scratchers out with their projects(like a password generator, perhaps)!
You can import/export lists in Scratch. Try right-clicking the list. It saves into a txt file, \n separating the different elements of the list. Scratch has Cloud Variables, so Lists should have something of their own, which is Filed lists. Rather than making a List fixed as Filed or normal(like Cloud Vars) Lists should have 3 new blocks:
store list [ v] in this device :: list
import stored list into [ v] :: list
is a list stored in this device? :: list boolean
The txt file should have a fixed directory, and only one list can be stored in a device. if the store list block is called twice or more, the stored list would get overwritten. Also when one of these 3 blocks is used for the first time, a notification(like the Cloud var) should say
“Only 64 items in this list will get stored. A stored list may only contain numbers.(optional?) For more information, check HERE.”
I think only 64 items should get stored, each having a 128 digit limit(like the Cloud Var). Also, maybe it should only contain numbers to prevent people writing malicious code and making the first item be “//try changing txt into bat to see what happens!”.
And lastly, the project should alert users like the Username block. Also, should the usage of these blocks be only allowed to Scratches, and not New Scratchers? Note that Cloud Vars are almost as abusable as this suggestion, but people are using it nicely with the proper restrictions!
Here are some optional suggestions for blocks:
store list [ v] in this device with encryption number() :: list
import encrypted stored list into [ v] with number() :: list
These will store the list with an encryption process in the middle.
maybe the encryption should be general blocks:
encrypt [] with number () :: operators reporter
decrypt [] with number () :: operators reporter
Sure these can be made with existing blocks, but blocks like these should help New Scratchers out with their projects(like a password generator, perhaps)!
- cleroux1998
- Scratcher
3 posts
File I/O Blocks
I am supporting this sugestion.
For the “store” block, I will add the availability to give the name of the file where we want to store the values of a list. We should be able to use variables for that name. I am working for a Orthophonist project where the result should be stored with <patient name>_<date of the test> for example.
And the same characteristics for “import” block, even if in my case I do not really need that.
For the “store” block, I will add the availability to give the name of the file where we want to store the values of a list. We should be able to use variables for that name. I am working for a Orthophonist project where the result should be stored with <patient name>_<date of the test> for example.
And the same characteristics for “import” block, even if in my case I do not really need that.
- CalculatorFun
- Scratcher
94 posts
File I/O Blocks
No support.
I don't support the creation of an “encrypt” or “decrypt” block, there's many types of encryption methods, and no way this will be able to encrypt anything however we want to, it's just too vague. Second, I feel storing lists/variables somewhere locally in the computer/browser without cookies would be simpler, if you find something in the project breaking Scratch ToS or community guidelines, the report button is there.
I also feel you should be able to specify exactly how much data a project can store locally in your computer, just like in flash player.
And finally, I'm pretty sure there's no way for a text file to turn itself into an exe or any other file type, even if it could, you'd have to manually run it yourself, or have some program installed telling it to run.
Edit: I do support the idea of local variables, just not with these blocks, it would be nice to have a check box under the cloud variable box with “store as local variable” and then the new variable would have a floppy disk emoji to the left of its name.
I don't support the creation of an “encrypt” or “decrypt” block, there's many types of encryption methods, and no way this will be able to encrypt anything however we want to, it's just too vague. Second, I feel storing lists/variables somewhere locally in the computer/browser without cookies would be simpler, if you find something in the project breaking Scratch ToS or community guidelines, the report button is there.
I also feel you should be able to specify exactly how much data a project can store locally in your computer, just like in flash player.
And finally, I'm pretty sure there's no way for a text file to turn itself into an exe or any other file type, even if it could, you'd have to manually run it yourself, or have some program installed telling it to run.
Edit: I do support the idea of local variables, just not with these blocks, it would be nice to have a check box under the cloud variable box with “store as local variable” and then the new variable would have a floppy disk emoji to the left of its name.
Last edited by CalculatorFun (Jan. 14, 2019 22:23:50)
- sk7725
- Scratcher
35 posts
File I/O Blocks
Saved data cost money, and the ST probably could not afford it with Scratch being free for all. The ST mentioned the money problem at the suggestion of higher/no limit on project size. No support.
I feel storing lists/variables somewhere locally in the computer/browser without cookies would be simpler, if you find something in the project breaking Scratch ToS or community guidelines, the report button is there.
I mentioned it would be 64 items being numbers which has 128 digits will be the max. I also feel you should be able to specify exactly how much data a project can store locally in your computer, just like in flash player.
New Scratchers may not have full knowledge of the computers, but even some Scratchers dont. The method I mentioned, putting virus code in lists in txt form and asking the player to turn it into .bat or .exe may trap someone, if not many. And finally, I'm pretty sure there's no way for a text file to turn itself into an exe or any other file type, even if it could, you'd have to manually run it yourself, or have some program installed telling it to run.
- ninjaMAR
- Scratcher
1000+ posts
File I/O Blocks
Support I would Like this to be added to scratch because I think the idea of storing lists is cool
- JackK211424
- Scratcher
500+ posts
File I/O Blocks
I support the idea of storing a local file, but im not sure this is possible…
Idk, it might be.
But if this were to exist, i feel like the
also this should probably be an extension.
Idk, it might be.
But if this were to exist, i feel like the
block should beis a list stored in this device? :: list boolean
(Lists stored in this device :: list ::)
also this should probably be an extension.
Last edited by JackK211424 (July 30, 2020 17:18:05)
- BozendorpherImperial
- Scratcher
10 posts
File I/O Blocks
Good idea! I would also add this: some apps are limited to making files on a device, i reccomend that the project displays an alert if the .txt file fails to be created, or read by the project.
- beware4
- Scratcher
11 posts
File I/O Blocks
That's actually a great idea!
(not sure if it will actually put a block saying print amazing).
Print ("Amazing!")
(not sure if it will actually put a block saying print amazing).
- MDCCCLXVII
- Scratcher
1000+ posts
File I/O Blocks
not a part of the suggestion That's actually a great idea!Print ("Amazing!")
(not sure if it will actually put a block saying print amazing).
- samq64
- Scratcher
1000+ posts
File I/O Blocks
I like this idea, but if it's limited to 128 numbers it would be better to just export it manually (and have almost unlimited storage.)
- Carrotoplia
- Scratcher
44 posts
File I/O Blocks
BUMP really useful and good suggestion these blocks would remove save codes that hurt my brain
hey [v]
- Tunde123
- Scratcher
1000+ posts
File I/O Blocks
Please don't block spam.set [ v] to ((Readfile("hello")))
This is a SIGNATURE. This is seperate from a normal post ^
Forum Posts: 2600+/3000
Highlight + Shift + Down Arrow = To see whole signature.
Want to friend me on Roblox? My username is BaconvsRoblox121314 if you want to friend me!
–v More Information v–
New Scratchers - Introduce yourself here!
Questions about Scratch - Ask questions related to scratch here!
Help with Scripts - get/provide help here!
Suggestions - Suggest blocks, features, and more here!
Bugs and Glitches - Report bugs/glitches here!
Last edited by Tunde123 (May 17th, 2022 10:18 AM EST)
- Discussion Forums
- » Suggestions
- » File I/O Blocks