Present target in random letter location, depending on word length


Author
Message
Lizzy
Lizzy
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)
Group: Forum Members
Posts: 26, Visits: 105
Hi,

I want to run a modified dot-probe task in which first a cue slope, then 2 words (matched for length), and then a target slope (/ or \) are presented. The task is to indicate whether or not the slope direction of the cue and target slope match. I want the cue and target slopes to be presented randomly in one of the letter locations of the words. So, if the words have 4 letters, the cue and target should appear at random in one of 4 positions.

I have created a script where I have a list of items for the words, and counter element (lengthT) where the length of each word is specified. Words length ranges between 4  and 12 letters. Here's what I've done next:

<item SubSL4>
/ 1 =  "    \       "   (12 characters, 11 spaces 1 slope)
/ 2 =  "     \      "
/ 3 =  "      \     "
/ 4 =  "       \    "
</item>

<item SubSL5>
/ 1 =  "   \        "
/ 2 =  "    \       "
/ 3 =  "     \      "
/ 4 =  "      \     "
/ 5 =  "       \    "
</item>

<item SubSL6>
/ 1 =  "   \        "
/ 2 =  "    \       "
/ 3 =  "     \      "
/ 4 =  "      \     "
/ 5 =  "       \    "
/ 6 =  "        \   "
</item>

and so on to SubSL12:
<item SubSL12>
/ 1 =  "\           "
/ 2 =  " \          "
/ 3 =  "  \         "
/ 4 =  "   \        "
/ 5 =  "    \       "
/ 6 =  "     \      "
/ 7 =  "      \     "
/ 8 =  "       \    "
/ 9 =  "        \   "
/ 10 =  "         \  "
/ 11 =  "          \ "
/ 12 =  "           \"
</item>

Same for the right tilting slopes:

<item SubSR4>
/ 1 =  "    /       "
/ 2 =  "     /      "
/ 3 =  "      /     "
/ 4 =  "       /    "
</item>

and so on to SubSR12

The idea is that with a monospaced font, this should correspond to the letter locations of the words.

Then, pick one option at random for each possible word length:

<text ProbeSL4S>
/ items = SubSL4
/ select = noreplace
</text>

<text ProbeSL5S>
/ items = SubSL5
/ select = noreplace
</text>

<text ProbeSL6S>
/ items = SubSL6
/ select = noreplace
</text>

and so on to ProbeSL12S

Same for right slopes:

<text ProbeSR4S>
/ items = SubSR4
/ select = noreplace
</text>

And so on to ProbeSR12S


Then I've created an item element where, depending on word length, the randomly chosen slope is assigned to at the start of the trial

<item ProbeSLfinal>
/ 1 = ""
</item>

<item ProbeSRfinal>
/ 1 = ""
</item>

Lastly, this item is taken and presented at either the bottom (60%) or top location (40%) of the screen

<text ProbeSLB>
/ items = ProbeSLfinal
/ fontstyle = ("Courier", 24)
/ position = (50%, 60%)
/ txcolor = (255,0,0)
/ txbgcolor = (0,0,0)
</text>

<text ProbeSLT>
/ items = ProbeSLfinal
/ fontstyle = ("Courier", 24)
/ position = (50%, 40%)
/ txcolor = (255,0,0)
/ txbgcolor = (0,0,0)
</text>

<text ProbeSRB>
/ items = ProbeSRfinal
/ fontstyle = ("Courier", 24)
/ position = (50%, 60%)
/ txcolor = (255,0,0)
/ txbgcolor = (0,0,0)
</text>

<text ProbeSRT>
/ items = ProbeSRfinal
/ fontstyle = ("Courier", 24)
/ position = (50%, 40%)
/ txcolor = (255,0,0)
/ txbgcolor = (0,0,0)
</text>

The script for a trial is:

<trial ThreatT_ATSL_TTSR_DESMM> (one of many options)
/ ontrialbegin = [if (counter.lengthT = 4) item.ProbeSLfinal.item.1 = text.ProbeSL4S.item.1]
/ ontrialbegin = [if (counter.lengthT = 5) item.ProbeSLfinal.item.1 = text.ProbeSL5S.item.1]
/ ontrialbegin = [if (counter.lengthT = 6) item.ProbeSLfinal.item.1 = text.ProbeSL6S.item.1]
/ ontrialbegin = [if (counter.lengthT = 7) item.ProbeSLfinal.item.1 = text.ProbeSL7S.item.1]
/ ontrialbegin = [if (counter.lengthT = 8) item.ProbeSLfinal.item.1 = text.ProbeSL8S.item.1]
/ ontrialbegin = [if (counter.lengthT = 9) item.ProbeSLfinal.item.1 = text.ProbeSL9S.item.1]
/ ontrialbegin = [if (counter.lengthT = 10) item.ProbeSLfinal.item.1 = text.ProbeSL10S.item.1]
/ ontrialbegin = [if (counter.lengthT = 11) item.ProbeSLfinal.item.1 = text.ProbeSL11S.item.1]
/ ontrialbegin = [if (counter.lengthT = 12) item.ProbeSLfinal.item.1 = text.ProbeSL12S.item.1]
/ ontrialbegin = [if (counter.lengthT = 4) item.ProbeSRfinal.item.1 = text.ProbeSR4S.item.1]
/ ontrialbegin = [if (counter.lengthT = 5) item.ProbeSRfinal.item.1 = text.ProbeSR5S.item.1]
/ ontrialbegin = [if (counter.lengthT = 6) item.ProbeSRfinal.item.1 = text.ProbeSR6S.item.1]
/ ontrialbegin = [if (counter.lengthT = 7) item.ProbeSRfinal.item.1 = text.ProbeSR7S.item.1]
/ ontrialbegin = [if (counter.lengthT = 8) item.ProbeSRfinal.item.1 = text.ProbeSR8S.item.1]
/ ontrialbegin = [if (counter.lengthT = 9) item.ProbeSRfinal.item.1 = text.ProbeSR9S.item.1]
/ ontrialbegin = [if (counter.lengthT = 10) item.ProbeSRfinal.item.1 = text.ProbeSR10S.item.1]
/ ontrialbegin = [if (counter.lengthT = 11) item.ProbeSRfinal.item.1 = text.ProbeSR11S.item.1]
/ ontrialbegin = [if (counter.lengthT = 12) item.ProbeSRfinal.item.1 = text.ProbeSR12S.item.1]
/ stimulustimes = [0 =   crossB, crossT, arrowUp; 1000 = blankmid, blanktop, blankbottom, ProbeSLT; 1150 = blanktop, blankbottom, zThreatTop, zNonBottom; 1650 = blanktop, blankbottom, ProbeSRT]
/ inputdevice = mousekey
/ validresponse = (lbuttondown, rbuttondown)
/ correctresponse = (lbuttondown)
</trial>

The script partly works in that right or left tilting slopes (accurate) are presented at the top or bottom of the screen (accurate), however the slope is always at the same location on the x-axis, slightly off-centre to the left (looks like corresponding to the first letter position of a 5 letter word). The slopes (whether cue or target) are always in that position, independent of word length. There is no variation in the x-axis position of the slope, which I had hoped to achieve by randomly picking one of the possible options, and feeding that forward through the script.

I tried reprogramming it in a dozen ways to fix the problem, but have been unsuccessful so far.
Any help with this would be much appreciated!!

Cheers


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search