<div dir="ltr">thanks so much - this is very helpful!<br><br>On Wednesday, November 20, 2013 3:20:15 AM UTC-5, Paul Groot wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Just a minor detail: instead of a while loop you could use a for-loop, which is the preferred construction to iterate over an index, and is less sensitive for infinite loop 'accidents'. <div><br></div>
<div>About your question: I think it would be a nice feature to be able to refer to E-Basic variables inside list elements. However, the developers of E-Prime used a different approach for dynamically loading list content: </div>
<div>1) the []-syntax to reference the content of another attribute (i.e. [OtherAttrib])</div><div>2) nested lists</div><div><br></div><div>You can combine the two to pull values from another (nested) list. So, if you put the four filenames in a nested ColorList, you could use these values in the Train list. (Using the randomization settings of the ColorList when populating the Train list.) In this case you probably have to use the colon syntax to pull four values from the same nested attribute for a single Train trial ([OtherAttrib:0] [OtherAttrib:1] etc.). So, in your case you could place [OtherAttrib:0] in the Color1 attribute, [OtherAttrib:1] in the Color2 attribute, etc.</div>
<div><br></div><div><br></div><div>Also see the attached example.</div><div><br></div><div>Cheers</div><div>Paul</div><div><br></div><div><br></div><div><br></div></div><div><br><br><div class="gmail_quote">
On 20 November 2013 00:09, Stephen Mattingly <span dir="ltr"><<a href="javascript:" target="_blank" gdf-obfuscated-mailto="jBSI1bvO-hsJ">ndlabm...@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi All,<br> Is there any way for an attribute cell (within a list) to call for a value, rather than just use the value in the cell?<br><br>currently, if i put a string variable name in the attribute cell in a list (e.g. randomColor(0) ), it tries to find a file name that is the variable name (tries to find file,"randomColor(0)" ). rather, i would like it to look up the value stored by the variable and use THAT string as a filename.<br>
<br>as i build complexity into this task, my current solution becomes a pain, but my current solution is below:<br><br><br>---<br><br>i want to randomize a list of colors at the beginning, but to keep the value the same for the rest of the experiment.<br>
<br>first inline<br><br>Dim randomColor(3) as String<br>randomColor(0)="red.bmp"<br>randomColor(1)="blue.bmp"<br>randomColor(2)="yellow.bmp"<br>randomColor(3)="green.bmp"<br>Randomize<br>
randomizeArray randomColor<br><br>while ColorAssignCount < 49 '48 training trials<br><br>Train.SetAttrib ColorAssignCount, "Color1", randomColor(0)<br>Train.SetAttrib ColorAssignCount, "Color2", randomColor(1)<br>
Train.SetAttrib ColorAssignCount, "Color3", randomColor(2)<br>Train.SetAttrib ColorAssignCount, "Color4", randomColor(3)<br><br>ColorAssignCount = ColorAssignCount + 1<br><br>wend<br>--<br><br>it would be simpler to be able to call, within each list, 'randomColor(0)', as i will eventually have many lists and other elements that need randomization in a similar way. <br>
<span><font color="#888888"><br></font></span></div><span><font color="#888888">
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="jBSI1bvO-hsJ">e-prime+u...@<wbr>googlegroups.com</a>.<br>
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="jBSI1bvO-hsJ">e-p...@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/05910ed9-26aa-4638-9a92-a629eb513946%40googlegroups.com" target="_blank">https://groups.google.com/d/<wbr>msgid/e-prime/05910ed9-26aa-<wbr>4638-9a92-a629eb513946%<wbr>40googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/<wbr>groups/opt_out</a>.<br>
</font></span></blockquote></div><br></div>
</blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe@googlegroups.com.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/e-prime/ccb6aded-b598-4d11-86f4-df2ff6c8d057%40googlegroups.com">https://groups.google.com/d/msgid/e-prime/ccb6aded-b598-4d11-86f4-df2ff6c8d057%40googlegroups.com</a>.<br />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />