Group: Forum Members
Posts: 14,
Visits: 80
|
Original script from inquisit used keyboard as an input device, and I'm trying to change input device to mouse. Scancode for space key was 57, but I can't find any scancode for mouse left button. I tried 84 and 85, but it didn't worked. Following is part of the original script (Go-nogo task), and it's coding correct response using scan code (0=noresponse, 57=space bar). How can I code 'left mouse down' with a number?
<list correctresp> / items = ( 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0,
0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57, 0,0,0,0,57) / selectionmode = list.soa.currentindex </list>
|
Group: Forum Members
Posts: 14,
Visits: 80
|
Thanks for your reply! I tried to add some text to code 'lbuttondown' for response. Original script defines correct response with '0(no response)' and '57 (space bar)'. If input and predefined correct response are identical , the input is marked as a correct answer. I added underlined text to shift 'noresponse' into 0 (same as original script) , and 'lbuttondown response' into '57' and assigned them using a new value (respreal). I ran the script, but values.respreal from data file is '0' all the time (in every trial)! How can I fix this? I want to assign 'lbuttondown' as '57' in values.respreal, and 'noresponse' as '0' in values.respreal. I attached inquisit script file that I modified.
************************************************************************************************************************************************************************** ************************************************************************************************************************************************************************** Correct Responses (57=spacebar on go trials, 0=no response on no-go trials) ************************************************************************************************************************************************************************** ************************************************************************************************************************************************************************** <list correctresp> / items = ( 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0)
<trial target> / ontrialbegin = [if (values.correctresp != 0) values.count_go += 1 else values.count_nogo += 1] / stimulustimes = [0=target] / inputdevice = mousekey / validresponse = (lbuttondown, noresponse) / ontrialend = [if(trial.target.response=="lbuttondown") {values.respreal=57}] / ontrialend = [if(trial.target.response== 0) {values.respreal= 0}] / iscorrectresponse = [values.respreal==values.correctresp]
|
Group: Forum Members
Posts: 14,
Visits: 80
|
Thanks for reply. I modified script as you suggested (underlined text), and I fount one problem. I want to mark response as correct answer if 1) response is 'lbuttondown' && values.correctresp == 57 or 2) response is '0 (no response)' && values.correctresp == 0 but...inquisit marked response 'correct' when response==0 && values.correctresp ==57 (which should be marked 'wrong'). Is there anything wrong with my logic on script?
************************************************************************************************************************************************************************** ************************************************************************************************************************************************************************** Correct Responses (57=spacebar on go trials, 0=no response on no-go trials) ************************************************************************************************************************************************************************** ************************************************************************************************************************************************************************** <list correctresp> / items = ( 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0, 57,57,57,57,0) <trial target> / ontrialbegin = [if (values.correctresp != 0) values.count_go += 1 else values.count_nogo += 1] / stimulustimes = [0=target] / inputdevice = mousekey / validresponse = (lbuttondown, noresponse) / iscorrectresponse = [(trial.target.response=="lbuttondown" && values.correctresp==57) || (trial.target.response== 0 && values.correctresp== 0)]
|