+x+x+x+xI am designing a set of tasks for Inquisit web that I will run using the batch element.
In the first task, one stimulus from a set of 10 stimuli is randomly selected and then this same stimulus is presented across numerous trials of the study. The stimulus is selected using the following counter element:
<counter targetcounter>
/ select = noreplace(1-10)
/ selectionrate = experiment
/ resetinterval = 0
</counter>
I need the second task to also present this same randomly-selected stimulus, which means I need to pass information about which stimulus was selected in the first task to the second task. I’m having trouble figuring out how to do this smoothly. Any guidance would be most appreciated! (Also happy to provide the scripts for the two tasks if it would be helpful).
https://www.millisecond.com/support/docs/v6/html/howto/batchparameters.htm
I did consult this support article already but unfortunately, I'm unable to get things to work properly. The problem I'm running into is that I am selecting one from ten pictures as stimuli in the first script. The selected picture (or, at least, the number of the selected picture in the list) then needs to get passed to the second script. I've been easily able to pass numeric parameters in previous batch scripts I've constructed, but the added wrinkle of this being a picture that needs to get passed is tripping me up. It's almost certain that, given my limited programming experience, I am just making a simple error here. I'm attaching the scripts in case you are able to look them over and suggest a path forward. Thank you and, again, apologies for what I'm almost certain is a simple fix for someone who is more familiar with programming languages!
You don't need to pass a "picture". You need to pass an item number. That's no different than passing a score from script A to script B. Script A picks an item number, that item number just gets passed to script B in a variable / parameter.
Script B then just needs to *use* that variable / parameter for item selection.
The scripts you provided are of little use, since they can't be run. If you need to provide scripts, please always include any and all files they require to run.
Apologies for not including all the files. Rookie mistake.
I understand that the item number is what need to gets passed, but I'm having trouble figuring out how to pass it to the correct element in the second script. I'm unable to provide the full materials in a zip folder because I'm told it will put me over my size limit, but
here is a link to the materials. But here are the parts that I think are most important as well:
Here's the code from the Batch file:
<parameters>
/ target_character = 0
</parameters>
<values>
/ target_character_mere_exposure = 0
</values>
<batch mere_exposure>
/ file = "Mere Exposure 30 vs. 0 exposures v1.iqx"
/ file = "SCIAT 30 vs. 0 exposures v1.iqx"
/ onscriptend = [
if(batch.mere_exposure.currentscript == "Mere Exposure 30 vs. 0 exposures v1.iqx")
{
parameters.target_character = values.target_character_mere_exposure
}]
</batch>
In the "Mere Exposure 30 vs. 0 exposures" file I have this code:
<values>
/ target_character_mere_exposure = 0
</values>
<trial target_arrowleft>
/ pretrialpause = 1500
/ validresponse = ("I", "E")
/ correctresponse = ("E")
/ stimulustimes = [1=fixation; 801=forwardmask; 831=target; 846=backwardmask; 876=blank; 877=leftarrow]
/ ontrialend = [item.presentedtarget.appenditem(picture.target.currentitem);]
/ ontrialend = [
values.target_character_mere_exposure = picture.target.currentitemnumber
]
</trial>
And then, in the SCIAT file I have this code:
<parameters>
/ target_character = 0
</parameters>
<values>
/ target_character_iat = 0
</values>
<expt a>
/ onexptbegin = [
values.conditionOrder = "c-ic";
]
/ onexptbegin = [
values.target_character_iat = parameters.target_character;
]
/ preinstructions = (iatintro)
/groups = (1 of 2)
/ blocks = [
1=practice_compatibletest;
2=compatibletestinstructions;
3=compatibletest;
4=practice_incompatibletest;
5=incompatibletestinstructions;
6=incompatibletest;
7=summary;
]
</expt>