This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-02-18 10:46:10

Hong1818
Scratcher
Registered: 2009-06-30
Posts: 33

Can Scratch connect to database or external file?

I am in a project team. I am now thinking to apply the scratch into teaching propose.
The learner can interact with the scratch, and finally a score will be shown for every learner. As we want to keep a track to their performence, we want to store their score in a database or other means.

i think this is a advanced topic for scratch and i am difficult to do that.
anyone can help me? or is there any add-ons for this propose?

many thanks to all!
hong

Last edited by Hong1818 (2010-02-22 23:09:18)

Offline

 

#2 2010-02-18 13:32:26

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Can Scratch connect to database or external file?

If you make a Python Program, or a program in some other language, then you could have that save the scores in a database or file.

Also: This is an Advanced Topic.  smile

Offline

 

#3 2010-02-18 14:19:34

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Can Scratch connect to database or external file?

Scratch has no database capabilities of it's own.  But it might be possible, using the Remote Sensing capabilities, to connect a Scratch project with another program using TCP/IP sockets, that handled the database activity.    Not an ideal situation - but it might suit your needs.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2010-02-18 23:11:02

Hong1818
Scratcher
Registered: 2009-06-30
Posts: 33

Re: Can Scratch connect to database or external file?

thanks, however, I saw a document in the internet.
http://chirp.scratchr.org/dl/Lists%20and%20Files%20for%20Scratch.pdf
which is writen by Jens Monig in 2008.

He said than we can import and export the array in a txt document format.
and he also said their is a block "write XXX.lst for mylist"
it means that the program can automatically save "mylist" as a file called "XXX.lst"

but i cannot find this block in scratch 1.3 nor 1.4.
anyone know that??
thanks a lot.

Offline

 

#5 2010-02-18 23:42:15

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Can Scratch connect to database or external file?

Chirp is a variant of Scratch that has features that the production version of Scratch does not. 

Scratch 1.4 can save the contents of a list to a file (and read it back in) but it has to be done interactively, by right-clicking on an list viewer and choosing Export or Import.  It does not have any blocks that do file access.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#6 2010-02-22 15:50:27

songhead95
Scratcher
Registered: 2008-03-19
Posts: 100+

Re: Can Scratch connect to database or external file?

I made a program to do this, search for "Scratch Softdev SDK"

Offline

 

#7 2010-02-22 21:50:35

Hong1818
Scratcher
Registered: 2009-06-30
Posts: 33

Re: Can Scratch connect to database or external file?

songhead95, i have found "Scratch Softdev SDK" in 4shared.com.
however, their is only some .app inside. is it only for mac?
no windows version?? and how to use?
thanks for your help~

Offline

 

#8 2010-02-25 03:08:14

Hong1818
Scratcher
Registered: 2009-06-30
Posts: 33

Re: Can Scratch connect to database or external file?

I have downloaded the Lists and Files for Scratch and it is work!
but, it exported a *.lst file. i think it should only readable by scratch.
As i want to import the score in this file into a database. i want to read it in notepad or excel format. Can i do it?

thanks

Offline

 

#9 2010-02-25 04:18:09

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Can Scratch connect to database or external file?

Hi Hong1818,

I'm glad you found and like my - old - list and files prototype. This was before the current list implementation in Scratch, when there were only numerical values, no strings. At the time I was trying to make very large lists work very fast . Part of that involved saving them in a binary format rather than in a user-editable one. Unfortunately that makes it next to impossible to reuse the .lst files outside of the prototype.

Why don't you use the current version of Scratch (1.4)? You can simple export import the lists manually using the right-click menu?


Jens Mönig

Offline

 

#10 2010-02-25 04:51:13

Hong1818
Scratcher
Registered: 2009-06-30
Posts: 33

Re: Can Scratch connect to database or external file?

Thanks Jens, you help me a lot.

the feature of right click and export the list in scratch 1.4 is only workable in scratch platfrom but not workable in explorer and in *.exe view.
I want to put the scratch online for student so that we can hide "how to get the highest mark". also, we can assess them from the score if we can export the data from scratch to local file or to database.

You are a brilliant man and did a good job on chirp and BYOB
i am now playing BYOB 2.0 and i think that you can merge "list" in the future version.

keep going & look forword to new Scratch/BYOB version
hong

Offline

 

#11 2010-02-25 22:37:43

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Can Scratch connect to database or external file?

See my how to make a new block: [open browser with URL []] project to find out how to connect to the internet.
All we have to do to edit a database is open a php file, and add get arguments (like to google search, we'd ask the user what to search for, and then run [open browser with URL [(( 'www.google.ca/search?q=' <+> (answer) ))]][/blocks]. Trust me, Google will add this to a database  smile  )

Unfortunately, scratch cannot actually get any information back, however this is a start. I am working on making a scratchconnections app to do what you suggest.

Last edited by billyedward (2010-02-25 22:38:07)


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

Board footer