Problems with iscorrectresponse


Author
Message
nanna137
nanna137
New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)
Group: Forum Members
Posts: 2, Visits: 15
Dave - 8/20/2020
nanna137 - 8/20/2020
Hello all,

I want to use /iscorrectresponse to counterbalance which key to press on my trials. I have it currently set up as follows:

<trial practice_left>
/ pretrialpause = 300
/ validresponse = ("Q", "q", "P", "p")
/ iscorrectresponse = [(values.expcondition == 1 && trial.practice_left.response == "Q" || values.expcondition == 1 && trial.practice_left.response == "q")|| (values.expcondition == 2 && trial.practice_left.response == "P" || values.expcondition == 2 && trial.practice_left.response == "p")]

/ errormessage = (errormessage, 200)
/ responsemode = timeout (3000)
/ stimulustimes = [0=practicenames; 300 = eraser; 300= category_left]
/ posttrialpause = 300
</trial>

expcondition is defined globally as 0 but redefined onexptbegin as 1 or 2 (depending on the subject number).
The problem I am facing is that no matter what key I press, I always get the errormessage. I am new to Inquisit so I only half know what I am doing. I have tried several things to see where the problem lies (whether it is due to expcondition or whether it is due to using too many expressions), but nothing has worked so far.

Does anyone know where I am going wrong here?

Kind regards

The response property does not return the character imprinted on the key pressed (e.g. "p"), but the key's numerical keyboard scancode. See Tools -> Keyboard Scancodes in Inquisit Lab and https://www.millisecond.com/support/docs/v4/html/language/scancodes.htm

trial.practice_left.response == "p"
needs to be
trial.practice_left.response == 25

and so forth.

Thank you so much! I didn't even know this was a thing since it's not needed for correctresponse.
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
nanna137 - 8/20/2020
Hello all,

I want to use /iscorrectresponse to counterbalance which key to press on my trials. I have it currently set up as follows:

<trial practice_left>
/ pretrialpause = 300
/ validresponse = ("Q", "q", "P", "p")
/ iscorrectresponse = [(values.expcondition == 1 && trial.practice_left.response == "Q" || values.expcondition == 1 && trial.practice_left.response == "q")|| (values.expcondition == 2 && trial.practice_left.response == "P" || values.expcondition == 2 && trial.practice_left.response == "p")]

/ errormessage = (errormessage, 200)
/ responsemode = timeout (3000)
/ stimulustimes = [0=practicenames; 300 = eraser; 300= category_left]
/ posttrialpause = 300
</trial>

expcondition is defined globally as 0 but redefined onexptbegin as 1 or 2 (depending on the subject number).
The problem I am facing is that no matter what key I press, I always get the errormessage. I am new to Inquisit so I only half know what I am doing. I have tried several things to see where the problem lies (whether it is due to expcondition or whether it is due to using too many expressions), but nothing has worked so far.

Does anyone know where I am going wrong here?

Kind regards

The response property does not return the character imprinted on the key pressed (e.g. "p"), but the key's numerical keyboard scancode. See Tools -> Keyboard Scancodes in Inquisit Lab and https://www.millisecond.com/support/docs/v4/html/language/scancodes.htm

trial.practice_left.response == "p"
needs to be
trial.practice_left.response == 25

and so forth.

nanna137
nanna137
New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)New Member (31 reputation)
Group: Forum Members
Posts: 2, Visits: 15
Hello all,

I want to use /iscorrectresponse to counterbalance which key to press on my trials. I have it currently set up as follows:

<trial practice_left>
/ pretrialpause = 300
/ validresponse = ("Q", "q", "P", "p")
/ iscorrectresponse = [(values.expcondition == 1 && trial.practice_left.response == "Q" || values.expcondition == 1 && trial.practice_left.response == "q")|| (values.expcondition == 2 && trial.practice_left.response == "P" || values.expcondition == 2 && trial.practice_left.response == "p")]

/ errormessage = (errormessage, 200)
/ responsemode = timeout (3000)
/ stimulustimes = [0=practicenames; 300 = eraser; 300= category_left]
/ posttrialpause = 300
</trial>

expcondition is defined globally as 0 but redefined onexptbegin as 1 or 2 (depending on the subject number).
The problem I am facing is that no matter what key I press, I always get the errormessage. I am new to Inquisit so I only half know what I am doing. I have tried several things to see where the problem lies (whether it is due to expcondition or whether it is due to using too many expressions), but nothing has worked so far.

Does anyone know where I am going wrong here?

Kind regards
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search