text color selection


Author
Message
Georgia
Georgia
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 9, Visits: 49
Hello, 

I would like to have inquisit randomly select the text colour for a text element for a given trial, which will either be red or green. It needs to be random selection but for each trial type I should be able to have half of the trials in red letters and half in green letters. 

Is there something I can do with the /txcolor attribute or do I need to add some kind of dependency for /select? I am not sure how to do this.

I was thinking I may need to individually program the red and green trials and then do this using noreplace selection for the blocks, but that becomes very tedious because I have a lot of different trial types. 

Any help would be appreciated.
Thanks
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
You can do that using a <list> and some /ontrialbegin logic:

<block myblock>
/ trials = [1-4=mytrial]
</block>

<trial mytrial>
/ ontrialbegin = [text.mytext.textcolor=list.mylist.nextvalue]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("A", "B", "C", "D")
</text>

<list mylist>
/ items = (red, red, green, green)
</list>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search