Attribute cell to lookup value?

Stephen Mattingly ndlabmanager at gmail.com
Tue Nov 19 23:09:57 UTC 2013


Hi All,
   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?

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.

as i build complexity  into this task, my current solution becomes a pain, 
but my current solution is below:


---

i want to randomize a list of colors at the beginning, but to keep the 
value the same for the rest of the experiment.

first inline

Dim randomColor(3) as String
randomColor(0)="red.bmp"
randomColor(1)="blue.bmp"
randomColor(2)="yellow.bmp"
randomColor(3)="green.bmp"
Randomize
randomizeArray randomColor

while ColorAssignCount < 49  '48 training trials

Train.SetAttrib ColorAssignCount, "Color1", randomColor(0)
Train.SetAttrib ColorAssignCount, "Color2", randomColor(1)
Train.SetAttrib ColorAssignCount, "Color3", randomColor(2)
Train.SetAttrib ColorAssignCount, "Color4", randomColor(3)

ColorAssignCount = ColorAssignCount + 1

wend
--

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. 

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/05910ed9-26aa-4638-9a92-a629eb513946%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20131119/2f1d0ca2/attachment.htm>


More information about the Eprime mailing list