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

#1 2009-08-05 16:22:52

siderits
Scratcher
Registered: 2009-04-26
Posts: 21

Is there a way to log data into a text file?

Greetings:

I'm making a graph for light levels and I'd like to dave the values into a log file.
Is that possible?

Thanks!

Richard

Offline

 

#2 2009-08-05 16:28:39

SmartIrishKid
Scratcher
Registered: 2008-07-19
Posts: 1000+

Re: Is there a way to log data into a text file?

It should be possible to load it into a list, and then export the list to a .txt file, but I don't think it would work directly.


Discuss future Scratch RPGs, online games, and more!

Offline

 

#3 2009-08-05 18:46:53

siderits
Scratcher
Registered: 2009-04-26
Posts: 21

Re: Is there a way to log data into a text file?

Thanks. 
That's a great idea. 
I didn't notice the export option on the list.
I can monitor light levels every hour and graph the levels moving a small sprite, a pen down, x+10 and y=light sensor. 
R

Offline

 

#4 2009-08-05 19:08:56

siderits
Scratcher
Registered: 2009-04-26
Posts: 21

Re: Is there a way to log data into a text file?

OK, hit the wall.  Where does the list save to?

Offline

 

#5 2009-08-05 19:29:07

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Is there a way to log data into a text file?

siderits wrote:

OK, hit the wall.  Where does the list save to?

It saves to (I think) either the folder that the project is in, or the Scratch folder.


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#6 2009-08-05 19:39:41

siderits
Scratcher
Registered: 2009-04-26
Posts: 21

Re: Is there a way to log data into a text file?

I think it must not use an extension because I can import the files that I exported but cannot find them in explorer or any other program.  When I try to import them it shows these files in the scratch folder.  How do I get them inot excel for example?
Thanks Again!

Offline

 

#7 2009-08-05 21:10:39

SmartIrishKid
Scratcher
Registered: 2008-07-19
Posts: 1000+

Re: Is there a way to log data into a text file?

It saves to My Documents, if I remember correctly.


Discuss future Scratch RPGs, online games, and more!

Offline

 

#8 2009-08-06 07:27:13

siderits
Scratcher
Registered: 2009-04-26
Posts: 21

Re: Is there a way to log data into a text file?

There must be something I'm missing.  I can't find the files from outside of Scratch.  The files are there in the scratch directory but I can only see them if I try to import what I exported (from inside scratch) .  How do I find them with a text editor from outside of scratch so I can import them to excel.  Are they in a data or config file?
Thanks again.
Richard

Offline

 

#9 2009-08-06 16:11:19

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Is there a way to log data into a text file?

siderits wrote:

I think it must not use an extension because I can import the files that I exported but cannot find them in explorer or any other program.  When I try to import them it shows these files in the scratch folder.  How do I get them inot excel for example?
Thanks Again!

in Explorer, go to My Documents -----> Scratch Projects


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#10 2009-08-06 20:06:47

siderits
Scratcher
Registered: 2009-04-26
Posts: 21

Re: Is there a way to log data into a text file?

Thanks.  You pointed me in the right direction.
Here is the solution.
On Vista you navigate to the Program Files, Scratch folder.
Look on the menu of the File Explorer and you will see a button called:
"Show the Compatibility Files for this directory".  Click on this and the Exported List files from a scratch program suddenly become viewable/visable in the scratch folder.
I tried finding a coherent explanation for this but just gave up.
Anyway, thanks to everyone for your input!

Offline

 

#11 2009-12-22 16:11:57

null101
Scratcher
Registered: 2009-10-08
Posts: 12

Re: Is there a way to log data into a text file?

In Vista, when I export it, it gives me a permissions error. Do I have to turn my firewall off or something?

Offline

 

#12 2011-03-12 14:04:49

amurphy964
Scratcher
Registered: 2009-05-19
Posts: 3

Re: Is there a way to log data into a text file?

Useful information, thanks.
I'm doing datalogging at school and can now write a script to log light levels.

Offline

 

#13 2011-03-14 21:30:36

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

Re: Is there a way to log data into a text file?

null101 wrote:

In Vista, when I export it, it gives me a permissions error. Do I have to turn my firewall off or something?

You just need to add permissions to that folder for your account, if you are logged in as the administrator, then you shouldn't be getting that error.

Offline

 

Board footer