Try the attached revision. You were actually VERY close! All I did was replace the instances of the variable names such as "varaq1" with "aq_01". If the reaction times for each item are important, you would need to add additional syntax to capture them. Just note that the variable names in the HTML need to match those that MediaLab uses in the data files.
Hope that helps!
___________
On a more complicated and not necessary note:
I entered the variable names explicitly and removed the replacement syntax you used (I generally prefer to keep the variable names explicit in the HTML unless I'm repeating the question with different content later on). The substitution syntax could be used but your syntax would need to be modified a bit:
in your syntax: NAME="var7" rather than NAME="varaq7" and the numeric id's would need to be changed to _01 rather than 1 (_02 rather than 2 etc.)
and in the replace function: ml.replace NAME="var == NAME="ml.varname
Otherwise you would get "aqaq1" as the variable name which ML would not be able to match up with anything in the data file. aq_01 is what you're trying to get (and aq_02, aq_03, etc.). Again, that's why I usually just make it explicit unless there is a real gain in efficiency to use the replacement stuff.




Reply With Quote