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

#1 2011-12-02 16:34:03

Mr_Sanders
New Scratcher
Registered: 2011-12-02
Posts: 2

how to capture data from a scratch script

Is there any way to send/output/write/email/log/file data from a scratch variable or list variable (array) to any electronic format or to any other program?

My son made his 6th grade science fair project of a robot simulator in scratch (really cool).  But, then he had to copy out by hand 720 data points into excel for standard deviation calculation and to make charts (~3 hours reading from the screen and typing = really not cool).  Now he wants to do phase two of the project, which would require over 3,000 data points be written out (so uncool as to be practically unfeasible).

If data output is not possible, then has anyone done a standard deviation in scratch?  I think I can see how he would do min, max, median, etc. directly in the script, but standard deviation and graphs I do not see happening?

Offline

 

#2 2011-12-02 16:54:35

luiysia
Scratcher
Registered: 2011-07-05
Posts: 1000+

Re: how to capture data from a scratch script

Scratch cannot interact with other files in the computer, so to answer the first question, no. People have done standard deviation in Scratch, though: here and here. I don't know how accurate these are, though (I haven't tried them out).

Edit: Even better, use the method from the person below me.

Last edited by luiysia (2011-12-02 21:27:13)


http://i50.tinypic.com/dx00pd.gif

Offline

 

#3 2011-12-02 18:52:30

Ratty1967UK
Scratcher
Registered: 2007-05-16
Posts: 88

Re: how to capture data from a scratch script

append the data you wish to export to a "list" variable.

When the program completes, tick the checkbox next to the variable to display the list on the stage if it isn't already visible.

Right click on the list and choose "export" - give it a filename and you're done!  smile

Offline

 

#4 2011-12-03 00:28:49

Mr_Sanders
New Scratcher
Registered: 2011-12-02
Posts: 2

Re: how to capture data from a scratch script

well, my goodness, that was easy.   smile

I feel a little foolish for not figuring that out myself, but un-foolish for finally asking for help here.

THANKS!

I will say for anyone trying this at home, with 360 data points in my list,  my laptop went into an apparent coma for a minute or two before the Save As popup made its appearance on my screen following the right-click.  I thought Scratch was truly crashed, gave up, and was trying to kill the program when the popup finally arrived. A little patience may be required for larger lists, but much less patience than  what it took to type  all  those points in by hand.

Let me just say, "Thanks!" again.

smile

Offline

 

Board footer