David: This seems to work -- so that's great to see.<br><br>In retrospect, I do see how it was kind of odd to throw in that last /t after the final entry in each row.<br><br>Thanks for the tip!<br><br><br><br><br><br><br><br>On Thursday, April 19, 2012 4:24:08 PM UTC-4, McFarlane, David wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Karin,<p>Thanks for the files, this made a nice little <br>puzzle to solve. The problem seemed pretty <br>obvious to me once I looked at it, but here is <br>the clue: Life gets better when you have a <br>professional quality text editor, and know how to <br>use it (I have used EditPad Pro for years <br>(<a href="http://www.editpadpro.com" target="_blank">http://www.editpadpro.com</a> ), but you can find many other good ones).</p><p>Using EditPad Pro, I could look at the raw <br>hexadecimal codes in the file, but I really did <br>not have to go that far. I needed only to enable <br>"Visualize Spaces", which also showed me all the <br>tab characters in the file. Voilą! There, at <br>the end of every one of your data lines, was an <br>extra tab character (i.e., in Unix/C, an extra <br>\t). E.g., with that encoding, your first full data line looks like</p><p>1\t[stimulus0]\t0\t0\tno\t</p><p>but should look like</p><p>1\t[stimulus0]\t0\t0\tno</p><p>i.e., without the extra tab (\t) at the end. As <br>you have found out, E-Prime cannot handle those <br>extra tab characters at the end!</p><p>So the solution is just to fix your MATLAB <br>program so that it does not add a \t to the end <br>of your data lines. And yes, you still should <br>use the fopen 'wt' flags, or explicitly end each <br>line with \r\n, to comply with PC text file conventions.</p><p>BTW, I also tweeted this solution to my <br>@EPrimeMaster Twitter feed. I have been tweeting short solutions all day!</p><p>Regards,<br>-----<br>David McFarlane<br>E-Prime training <br>online: <a href="http://psychology.msu.edu/Workshops_Courses/eprime.aspx" target="_blank">http://psychology.msu.edu/<wbr>Workshops_Courses/eprime.aspx</a><br>Twitter: @EPrimeMaster (<a href="http://twitter.com/EPrimeMaster" target="_blank">twitter.com/EPrimeMaster</a>)</p><p><br>At 4/19/2012 03:34 PM Thursday, David McFarlane wrote:<br>>I rarely look at people's files, but this looks <br>>interesting enough that I would like to take a <br>>crack at it. Please send me your problem .txt <br>>file -- just to me, *not* to the whole group! Thanks.<br>><br>>-- David McFarlane<br>><br>><br>>At 4/19/2012 03:24 PM Thursday, you wrote:<br>>>Hello all,<br>>><br>>>This is a copy of a post that I recently added to the forum on PST's<br>>>website.<br>>><br>>>I am in a situation in which I need to create a large number of<br>>>unique, predetermined stimulus sequences for each subject in a study.<br>>>I am relying on a matlab script to create these sequences; it would be<br>>>very hard to create them on the fly in E-Prime. So, I am generating<br>>>the sequences using matlab, having matlab write out the properly-<br>>>formatted text files, and telling E-Prime to use these text files to<br>>>populate the relevant List Objects.<br>>><br>>>Here's the problem: When I try to run an E-Prime program that calls to<br>>>these files, it crashes out entirely -- which is to say, not only does<br>>>the experiment self-abort, but E-Studio closes, and I get a message<br>>>regarding this from Windows.<br>>><br>>>What's even stranger is that if I take those same matlab-generated<br>>>text files, open them in Excel (including the run through the<br>>>conversion wizard), and then re-save them with the same .txt extension<br>>>-- then suddenly everything works fine. So it is true that I have<br>>>something of a workaround, but it is one that involves a tedious, time-<br>>>consuming step that is potentially prone to human error (opening and<br>>>re-saving all those files). So, it would be nice to get my matlab-<br>>>generated files to work.<br>>><br>>>I thought I had found the solution with the following matlab help<br>>>page:<br>>><a href="http://www.mathworks.com/support/solutions/en/data/1-15HVX/index.html?product=ML&solution=1-15HVX" target="_blank">http://www.mathworks.com/<wbr>support/solutions/en/data/1-<wbr>15HVX/index.html?product=ML&<wbr>solution=1-15HVX</a><br>>><br>>>I tried both their 'wt' option and their '/r/n' solution, and while<br>>>both did successfully make my text files more Notepad-friendly, they<br>>>still resulted in the same crashing of the E-Prime program.<br>>><br>>>Thoughts?</p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p></blockquote>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/ajSDl5Ct8QwJ">https://groups.google.com/d/msg/e-prime/-/ajSDl5Ct8QwJ</a>.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.<br />
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.<br />