write out specialized data file

David McFarlane mcfarla9 at msu.edu
Thu Jan 10 17:16:51 UTC 2013


Karin,

I was about to start by asking why you want to do this instead of 
just filtering your data later in E-DataAid, but then you answered 
that -- it seems that you want to generate output files in E-Prime 
that you will then use to control another task using MATLAB, etc.  So...

(1) Well, you could store everything during the run into an array, 
and then output the array at the end of the run.  I did things this 
way myself back when I programmed experiments in BASIC or C.  You can 
make this easier by first creating a User Defined Type for collecting 
the data of each trial, and then use an array of your UDTs to hold 
data for the entire run.

(2) In principle, yes, but you would have to know the intricate 
formatting details of .xls files.  Note that E-Prime is capapble of 
outputting binary to files.  But this seems to me more trouble than 
it is worth -- note, e.g., that Excel readily imports tab-delimited 
or comma-separated text, so I would just do that.

(3) See the Shell and AppActivate topics in the E-Basic Help 
facility, although I think you will find those inadequate.  Beyond 
that, try autoit (http://www.autoitscript.com/site/autoit/ ); search 
this Google Group for other discussions about this utility.

-----
David McFarlane
E-Prime training 
online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (https://twitter.com/EPrimeMaster)

/----
Stock reminder:  1) I do not work for PST.  2) PST's trained staff 
take any and all questions at 
http://support.pstnet.com/e%2Dprime/support/login.asp , and they 
strive to respond to all requests in 24-48 hours, so make full use of 
it.  3) In addition, offers several instructional videos on their 
YouTube channel (http://www.youtube.com/user/PSTNET ).  4) If you do 
get an answer from PST staff, please extend the courtesy of posting 
their reply back here for the sake of others.
\----


At 1/9/2013 05:12 PM Wednesday, you wrote:
>For an E-Prime program that I am currently preparing, I am intending 
>to insert some code that will take a very limited subset of my 
>logged variables and write them out as a customized output file.  I 
>am familiar with "Write" and the related E-Basic syntax, and my 
>default plan was to write the logged data, line by line, to a simple 
>text file.  I'm OK with that, but I was wondering if any of the more 
>sophisticated alternatives were available to me:
>
>(1) Is there any way I can write out the entire data set (i.e., 
>variable values as logged on every trial) all at once, or am I 
>limited to the line-by-line strategy that I described above?
>(2) Could I write out an .xls file rather than a .txt file?
>(3) Unlikely, but I wish: Could I subsequently tell E-Prime to 
>trigger another program (in this case, Matlab) to use that txt (or 
>xls) file as input for a script?
>
>Any and all tips or info are greatly appreciated!  As I said, I'm 
>fine with my current strategy, and am only wondering if I am 
>neglecting some more elegant alternative solution.
>
>Thanks much-
>Karin

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



More information about the Eprime mailing list