Emotional Stroop


Author
Message
Igor Iarrobino
Igor Iarrobino
New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)
Group: Forum Members
Posts: 19, Visits: 50
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Hello here,
You know well this emotional stroop task I'm making by trial-and-error
Here as for the emo dynamic I posted earlier, I should made some changes to adapt the script to the features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).

The script is giving no syntax errors, but it crashes
<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 1 test block.
In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. ... minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = R = left ("anger/rabbia")
                                25 = T = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> practice block is repeated if proportion correct of the last < 100%

2. Practice Block Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent)

3. 1 Test Block: 48 trials * emotion = 96 total trials:
Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "R")
/rightresponsekey:                                the right response key (default: "T")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3500
//feedbackDuration = 1000
/wordPresentationTime_test = 3500
/ITI = 1500
/FixationCross = 500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z" //lo stampino con la R va messo sulla Z
/rightresponsekey = "M" //lo stampino con la T va messo sulla M
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "In questa breve pratica le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.
Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/2 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/3 = "Adesso faremo un training per familiarizzare con l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/4 = "Adesso inizia l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.

Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, le ricordiamo di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/5 = "Grazie per aver partecipato!"
</item>


<item continueButtons>
/1 = "Prema la BARRA per continuare"
/2 = "Prema la BARRA per iniziare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Stop"
/8 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text fixationCross>
/ items = ("+")
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ size = (10%, 10%)
/ txcolor = black
/ erase = 500
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro e prema uno dei due tasti per cominciare";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF14ANS.jpg"
/2 = "AF25SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM28SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF14ANS.jpg"
/2="AF17ANS.jpg"
/3="AF25ANS.jpg"
/4="AM28ANS.jpg"
/5="AM29ANS.jpg"
/6="AM35ANS.jpg"
/7="AF14ANS.jpg"
/8="AF17ANS.jpg"
/9="AF25ANS.jpg"
/10="AM28ANS.jpg"
/11="AM29ANS.jpg"
/12="AM35ANS.jpg"
/13="AF14ANS.jpg"
/14="AF17ANS.jpg"
/15="AF25ANS.jpg"
/16="AM28ANS.jpg"
/17="AM29ANS.jpg"
/18="AM35ANS.jpg"
/19="AF14ANS.jpg"
/20="AF17ANS.jpg"
/21="AF25ANS.jpg"
/22="AM28ANS.jpg"
/23="AM29ANS.jpg"
/24="AM35ANS.jpg"

/25="AF14SAS.jpg"
/26="AF17SAS.jpg"
/27="AF25SAS.jpg"
/28="AM28SAS.jpg"
/29="AM29SAS.jpg"
/30="AM35SAS.jpg"
/31="AF14SAS.jpg"
/32="AF17SAS.jpg"
/33="AF25SAS.jpg"
/34="AM28SAS.jpg"
/35="AM29SAS.jpg"
/36="AM35SAS.jpg"
/37="AF14SAS.jpg"
/38="AF17SAS.jpg"
/39="AF25SAS.jpg"
/40="AM28SAS.jpg"
/41="AM29SAS.jpg"
/42="AM35SAS.jpg"
/43="AF14SAS.jpg"
/44="AF17SAS.jpg"
/45="AF25SAS.jpg"
/46="AM28SAS.jpg"
/47="AM29SAS.jpg"
/48="AM35SAS.jpg"

/49="AF14ANS.jpg"
/50="AF17ANS.jpg"
/51="AF25ANS.jpg"
/52="AM28ANS.jpg"
/53="AM29ANS.jpg"
/54="AM35ANS.jpg"
/55="AF14ANS.jpg"
/56="AF17ANS.jpg"
/57="AF25ANS.jpg"
/58="AM28ANS.jpg"
/59="AM29ANS.jpg"
/60="AM35ANS.jpg"
/61="AF14ANS.jpg"
/62="AF17ANS.jpg"
/63="AF25ANS.jpg"
/64="AM28ANS.jpg"
/65="AM29ANS.jpg"
/66="AM35ANS.jpg"
/67="AF14ANS.jpg"
/68="AF17ANS.jpg"
/69="AF25ANS.jpg"
/70="AM28ANS.jpg"
/71="AM29ANS.jpg"
/72="AM35ANS.jpg"

/73="AF14SAS.jpg"
/74="AF17SAS.jpg"
/75="AF25SAS.jpg"
/76="AM28SAS.jpg"
/77="AM29SAS.jpg"
/78="AM35SAS.jpg"
/79="AF14SAS.jpg"
/80="AF17SAS.jpg"
/81="AF25SAS.jpg"
/82="AM28SAS.jpg"
/83="AM29SAS.jpg"
/84="AM35SAS.jpg"
/85="AF14SAS.jpg"
/86="AF17SAS.jpg"
/87="AF25SAS.jpg"
/88="AM28SAS.jpg"
/89="AM29SAS.jpg"
/90="AM35SAS.jpg"
/91="AF14SAS.jpg"
/92="AF17SAS.jpg"
/93="AF25SAS.jpg"
/94="AM28SAS.jpg"
/95="AM29SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"

/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"

/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"

/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"

/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"

/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"

/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"

/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"

/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"

/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"

/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = black
/ screencolor = white
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2FRuns = 0
//selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 3
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 5
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.intropractice2F.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>

***********************
Instruction Trials
***********************

trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

//text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
//    if (trial.practice1.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice1.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2F
**************************************************************************************************************
**************************************************************************************************************
<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
//    if (trial.practice2F.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice2F.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [return trial.feedback;]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************
=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]Here, I made some changes to adapt the script to two features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>

<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

//trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-13 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>

<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = practice2FEnd;
    2 = getReady1;
3-98 = testEF;
    99 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = practice1Intro;
2 = practice1;
3 = noreplace(practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************
as the stimuli are about to be run.
I attach the script I changed this way.


You don't need to rely on trial and error.

There is extensive documentation available, which I recommend you make good use of.

For starters, you should work through the Programmer's Manual in its entirety. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf

As for what trials are and how stimulus timings work, see page 23 and onwards.

I appreciate your concern, but I do not have time to study extensively, because job is job and you're forced to do fast pace . Moreover, I am very naive and I am obliged to do this way.
I am sorry for that.
Can you support or not, pleas?

If you are not willing to read the documentation, not just in general, but not even directly relevant parts you're being pointed to because they are pertinent to your questions, I honeslty don''t know how I can help you.

Thank you again and anyway Dave!

From the Programmer's Manual (linked previously, page 25):



So, if you want to clear the screen and display a fixation stimulus for 500ms, then some stimulus after that for up to 5 seconds, you simply do

/ stimulustimes = [
    0 = clearscreen, fixation;
    500 = examplestimulus]
/ timeout = 5500


By default, responses are allowed once the stimulus presentation sequence is done, i.e. here starting at 500ms. Latency is measured relative to that point. Default /responseinterrupt is immediate, so the trial ends when a response occurs.Stimuli are erased by default when a trial ends, unless they're set to /erase = false.

https://www.millisecond.com/support/docs/v6/html/howto/responsetiming.htm
https://www.millisecond.com/support/docs/v6/html/howto/howtocontroltiming.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/responseinterrupt.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/erase.htm

Thank you very much Dave.
Very kind of you.
I followed your advices and I tried also other different way, but the fixation cross is not disappearing and goes on the stimulus which is barely visible.

I have a meeting in an hour and I must fix this :crying:

<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 1 test block.
In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. ... minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = R = left ("anger/rabbia")
                                25 = T = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> practice block is repeated if proportion correct of the last < 100%

2. Practice Block Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent)

3. 1 Test Block: 48 trials * emotion = 96 total trials:
Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "Z")
/rightresponsekey:                                the right response key (default: "M")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
//wordPresentationTime_practice = 3000
//feedbackDuration = 1000
//wordPresentationTime_test = 3000
/ITI = 1500
/fixationCross = 500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z" //lo stampino con la R va messo sulla Z
/rightresponsekey = "M" //lo stampino con la T va messo sulla M
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "In questa breve pratica le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.
Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/2 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/3 = "Adesso faremo un training per familiarizzare con l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/4 = "Adesso inizia l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.

Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, le ricordiamo di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/5 = "Grazie per aver partecipato!"
</item>


<item continueButtons>
/1 = "Prema la BARRA per continuare"
/2 = "Prema la BARRA per iniziare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Stop"
/8 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text fixationCross>
/ items = ("+")
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ size = (10%, 10%)
/ txcolor = black
/ txbgcolor = white
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro e prema uno dei due tasti per cominciare";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF14ANS.jpg"
/2 = "AF25SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM28SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF14ANS.jpg"
/2="AF17ANS.jpg"
/3="AF25ANS.jpg"
/4="AM28ANS.jpg"
/5="AM29ANS.jpg"
/6="AM35ANS.jpg"
/7="AF14ANS.jpg"
/8="AF17ANS.jpg"
/9="AF25ANS.jpg"
/10="AM28ANS.jpg"
/11="AM29ANS.jpg"
/12="AM35ANS.jpg"
/13="AF14ANS.jpg"
/14="AF17ANS.jpg"
/15="AF25ANS.jpg"
/16="AM28ANS.jpg"
/17="AM29ANS.jpg"
/18="AM35ANS.jpg"
/19="AF14ANS.jpg"
/20="AF17ANS.jpg"
/21="AF25ANS.jpg"
/22="AM28ANS.jpg"
/23="AM29ANS.jpg"
/24="AM35ANS.jpg"

/25="AF14SAS.jpg"
/26="AF17SAS.jpg"
/27="AF25SAS.jpg"
/28="AM28SAS.jpg"
/29="AM29SAS.jpg"
/30="AM35SAS.jpg"
/31="AF14SAS.jpg"
/32="AF17SAS.jpg"
/33="AF25SAS.jpg"
/34="AM28SAS.jpg"
/35="AM29SAS.jpg"
/36="AM35SAS.jpg"
/37="AF14SAS.jpg"
/38="AF17SAS.jpg"
/39="AF25SAS.jpg"
/40="AM28SAS.jpg"
/41="AM29SAS.jpg"
/42="AM35SAS.jpg"
/43="AF14SAS.jpg"
/44="AF17SAS.jpg"
/45="AF25SAS.jpg"
/46="AM28SAS.jpg"
/47="AM29SAS.jpg"
/48="AM35SAS.jpg"

/49="AF14ANS.jpg"
/50="AF17ANS.jpg"
/51="AF25ANS.jpg"
/52="AM28ANS.jpg"
/53="AM29ANS.jpg"
/54="AM35ANS.jpg"
/55="AF14ANS.jpg"
/56="AF17ANS.jpg"
/57="AF25ANS.jpg"
/58="AM28ANS.jpg"
/59="AM29ANS.jpg"
/60="AM35ANS.jpg"
/61="AF14ANS.jpg"
/62="AF17ANS.jpg"
/63="AF25ANS.jpg"
/64="AM28ANS.jpg"
/65="AM29ANS.jpg"
/66="AM35ANS.jpg"
/67="AF14ANS.jpg"
/68="AF17ANS.jpg"
/69="AF25ANS.jpg"
/70="AM28ANS.jpg"
/71="AM29ANS.jpg"
/72="AM35ANS.jpg"

/73="AF14SAS.jpg"
/74="AF17SAS.jpg"
/75="AF25SAS.jpg"
/76="AM28SAS.jpg"
/77="AM29SAS.jpg"
/78="AM35SAS.jpg"
/79="AF14SAS.jpg"
/80="AF17SAS.jpg"
/81="AF25SAS.jpg"
/82="AM28SAS.jpg"
/83="AM29SAS.jpg"
/84="AM35SAS.jpg"
/85="AF14SAS.jpg"
/86="AF17SAS.jpg"
/87="AF25SAS.jpg"
/88="AM28SAS.jpg"
/89="AM29SAS.jpg"
/90="AM35SAS.jpg"
/91="AF14SAS.jpg"
/92="AF17SAS.jpg"
/93="AF25SAS.jpg"
/94="AM28SAS.jpg"
/95="AM29SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"

/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"

/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"

/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"

/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"

/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"

/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"

/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"

/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"

/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"

/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = black
/ screencolor = white
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2FRuns = 0
/fixationCross = 0
//selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 3
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 5
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.intropractice2F.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>

***********************
Instruction Trials
***********************

trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

<trial fixationCross>
/ stimulusframes = [1 = fixationCross]
/ timeout = 500
/ response = noresponse
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

//text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulustimes = [0 = clearscreen,; 1500=fixationCross; 2000 = Word_practice1, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ timeout = 5000
/ ontrialend = [    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
//    if (trial.practice1.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice1.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
// trialduration = parameters.wordPresentationTime_practice
/ branch = [    return trial.ITI;]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2F
**************************************************************************************************************
**************************************************************************************************************
<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulustimes = [0 = clearscreen,; 1500=fixationCross; 2000 = Word_practice1, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ timeout = 5000
/ ontrialend = [    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
//    if (trial.practice2F.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice2F.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
// trialduration = parameters.wordPresentationTime_practice
/ branch = [return trial.ITI;]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************
=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulustimes = [0 = clearscreen,; 1500=fixationCross; 2000 = Word_practice1, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ timeout = 5000
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
// trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>

<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

//trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-13 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>

<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = practice2FEnd;
    2 = getReady1;
3-98 = testEF;
    99 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = practice1Intro;
2 = practice1;
3 = noreplace(practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************



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
Igor Iarrobino - 11/26/2024
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Hello here,
You know well this emotional stroop task I'm making by trial-and-error
Here as for the emo dynamic I posted earlier, I should made some changes to adapt the script to the features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).

The script is giving no syntax errors, but it crashes
<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 1 test block.
In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. ... minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = R = left ("anger/rabbia")
                                25 = T = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> practice block is repeated if proportion correct of the last < 100%

2. Practice Block Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent)

3. 1 Test Block: 48 trials * emotion = 96 total trials:
Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "R")
/rightresponsekey:                                the right response key (default: "T")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3500
//feedbackDuration = 1000
/wordPresentationTime_test = 3500
/ITI = 1500
/FixationCross = 500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z" //lo stampino con la R va messo sulla Z
/rightresponsekey = "M" //lo stampino con la T va messo sulla M
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "In questa breve pratica le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.
Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/2 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/3 = "Adesso faremo un training per familiarizzare con l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/4 = "Adesso inizia l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.

Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, le ricordiamo di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/5 = "Grazie per aver partecipato!"
</item>


<item continueButtons>
/1 = "Prema la BARRA per continuare"
/2 = "Prema la BARRA per iniziare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Stop"
/8 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text fixationCross>
/ items = ("+")
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ size = (10%, 10%)
/ txcolor = black
/ erase = 500
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro e prema uno dei due tasti per cominciare";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF14ANS.jpg"
/2 = "AF25SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM28SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF14ANS.jpg"
/2="AF17ANS.jpg"
/3="AF25ANS.jpg"
/4="AM28ANS.jpg"
/5="AM29ANS.jpg"
/6="AM35ANS.jpg"
/7="AF14ANS.jpg"
/8="AF17ANS.jpg"
/9="AF25ANS.jpg"
/10="AM28ANS.jpg"
/11="AM29ANS.jpg"
/12="AM35ANS.jpg"
/13="AF14ANS.jpg"
/14="AF17ANS.jpg"
/15="AF25ANS.jpg"
/16="AM28ANS.jpg"
/17="AM29ANS.jpg"
/18="AM35ANS.jpg"
/19="AF14ANS.jpg"
/20="AF17ANS.jpg"
/21="AF25ANS.jpg"
/22="AM28ANS.jpg"
/23="AM29ANS.jpg"
/24="AM35ANS.jpg"

/25="AF14SAS.jpg"
/26="AF17SAS.jpg"
/27="AF25SAS.jpg"
/28="AM28SAS.jpg"
/29="AM29SAS.jpg"
/30="AM35SAS.jpg"
/31="AF14SAS.jpg"
/32="AF17SAS.jpg"
/33="AF25SAS.jpg"
/34="AM28SAS.jpg"
/35="AM29SAS.jpg"
/36="AM35SAS.jpg"
/37="AF14SAS.jpg"
/38="AF17SAS.jpg"
/39="AF25SAS.jpg"
/40="AM28SAS.jpg"
/41="AM29SAS.jpg"
/42="AM35SAS.jpg"
/43="AF14SAS.jpg"
/44="AF17SAS.jpg"
/45="AF25SAS.jpg"
/46="AM28SAS.jpg"
/47="AM29SAS.jpg"
/48="AM35SAS.jpg"

/49="AF14ANS.jpg"
/50="AF17ANS.jpg"
/51="AF25ANS.jpg"
/52="AM28ANS.jpg"
/53="AM29ANS.jpg"
/54="AM35ANS.jpg"
/55="AF14ANS.jpg"
/56="AF17ANS.jpg"
/57="AF25ANS.jpg"
/58="AM28ANS.jpg"
/59="AM29ANS.jpg"
/60="AM35ANS.jpg"
/61="AF14ANS.jpg"
/62="AF17ANS.jpg"
/63="AF25ANS.jpg"
/64="AM28ANS.jpg"
/65="AM29ANS.jpg"
/66="AM35ANS.jpg"
/67="AF14ANS.jpg"
/68="AF17ANS.jpg"
/69="AF25ANS.jpg"
/70="AM28ANS.jpg"
/71="AM29ANS.jpg"
/72="AM35ANS.jpg"

/73="AF14SAS.jpg"
/74="AF17SAS.jpg"
/75="AF25SAS.jpg"
/76="AM28SAS.jpg"
/77="AM29SAS.jpg"
/78="AM35SAS.jpg"
/79="AF14SAS.jpg"
/80="AF17SAS.jpg"
/81="AF25SAS.jpg"
/82="AM28SAS.jpg"
/83="AM29SAS.jpg"
/84="AM35SAS.jpg"
/85="AF14SAS.jpg"
/86="AF17SAS.jpg"
/87="AF25SAS.jpg"
/88="AM28SAS.jpg"
/89="AM29SAS.jpg"
/90="AM35SAS.jpg"
/91="AF14SAS.jpg"
/92="AF17SAS.jpg"
/93="AF25SAS.jpg"
/94="AM28SAS.jpg"
/95="AM29SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"

/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"

/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"

/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"

/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"

/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"

/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"

/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"

/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"

/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"

/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = black
/ screencolor = white
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2FRuns = 0
//selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 3
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 5
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.intropractice2F.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>

***********************
Instruction Trials
***********************

trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

//text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
//    if (trial.practice1.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice1.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2F
**************************************************************************************************************
**************************************************************************************************************
<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
//    if (trial.practice2F.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice2F.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [return trial.feedback;]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************
=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]Here, I made some changes to adapt the script to two features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>

<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

//trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-13 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>

<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = practice2FEnd;
    2 = getReady1;
3-98 = testEF;
    99 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = practice1Intro;
2 = practice1;
3 = noreplace(practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************
as the stimuli are about to be run.
I attach the script I changed this way.


You don't need to rely on trial and error.

There is extensive documentation available, which I recommend you make good use of.

For starters, you should work through the Programmer's Manual in its entirety. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf

As for what trials are and how stimulus timings work, see page 23 and onwards.

I appreciate your concern, but I do not have time to study extensively, because job is job and you're forced to do fast pace . Moreover, I am very naive and I am obliged to do this way.
I am sorry for that.
Can you support or not, pleas?

If you are not willing to read the documentation, not just in general, but not even directly relevant parts you're being pointed to because they are pertinent to your questions, I honeslty don''t know how I can help you.

Thank you again and anyway Dave!

From the Programmer's Manual (linked previously, page 25):



So, if you want to clear the screen and display a fixation stimulus for 500ms, then some stimulus after that for up to 5 seconds, you simply do

/ stimulustimes = [
    0 = clearscreen, fixation;
    500 = examplestimulus]
/ timeout = 5500


By default, responses are allowed once the stimulus presentation sequence is done, i.e. here starting at 500ms. Latency is measured relative to that point. Default /responseinterrupt is immediate, so the trial ends when a response occurs.Stimuli are erased by default when a trial ends, unless they're set to /erase = false.

https://www.millisecond.com/support/docs/v6/html/howto/responsetiming.htm
https://www.millisecond.com/support/docs/v6/html/howto/howtocontroltiming.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/responseinterrupt.htm
https://www.millisecond.com/support/docs/v6/html/language/attributes/erase.htm


Igor Iarrobino
Igor Iarrobino
New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)
Group: Forum Members
Posts: 19, Visits: 50
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Hello here,
You know well this emotional stroop task I'm making by trial-and-error
Here as for the emo dynamic I posted earlier, I should made some changes to adapt the script to the features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).

The script is giving no syntax errors, but it crashes
<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 1 test block.
In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. ... minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = R = left ("anger/rabbia")
                                25 = T = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> practice block is repeated if proportion correct of the last < 100%

2. Practice Block Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent)

3. 1 Test Block: 48 trials * emotion = 96 total trials:
Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "R")
/rightresponsekey:                                the right response key (default: "T")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3500
//feedbackDuration = 1000
/wordPresentationTime_test = 3500
/ITI = 1500
/FixationCross = 500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z" //lo stampino con la R va messo sulla Z
/rightresponsekey = "M" //lo stampino con la T va messo sulla M
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "In questa breve pratica le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.
Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/2 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/3 = "Adesso faremo un training per familiarizzare con l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/4 = "Adesso inizia l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.

Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, le ricordiamo di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/5 = "Grazie per aver partecipato!"
</item>


<item continueButtons>
/1 = "Prema la BARRA per continuare"
/2 = "Prema la BARRA per iniziare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Stop"
/8 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text fixationCross>
/ items = ("+")
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ size = (10%, 10%)
/ txcolor = black
/ erase = 500
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro e prema uno dei due tasti per cominciare";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF14ANS.jpg"
/2 = "AF25SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM28SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF14ANS.jpg"
/2="AF17ANS.jpg"
/3="AF25ANS.jpg"
/4="AM28ANS.jpg"
/5="AM29ANS.jpg"
/6="AM35ANS.jpg"
/7="AF14ANS.jpg"
/8="AF17ANS.jpg"
/9="AF25ANS.jpg"
/10="AM28ANS.jpg"
/11="AM29ANS.jpg"
/12="AM35ANS.jpg"
/13="AF14ANS.jpg"
/14="AF17ANS.jpg"
/15="AF25ANS.jpg"
/16="AM28ANS.jpg"
/17="AM29ANS.jpg"
/18="AM35ANS.jpg"
/19="AF14ANS.jpg"
/20="AF17ANS.jpg"
/21="AF25ANS.jpg"
/22="AM28ANS.jpg"
/23="AM29ANS.jpg"
/24="AM35ANS.jpg"

/25="AF14SAS.jpg"
/26="AF17SAS.jpg"
/27="AF25SAS.jpg"
/28="AM28SAS.jpg"
/29="AM29SAS.jpg"
/30="AM35SAS.jpg"
/31="AF14SAS.jpg"
/32="AF17SAS.jpg"
/33="AF25SAS.jpg"
/34="AM28SAS.jpg"
/35="AM29SAS.jpg"
/36="AM35SAS.jpg"
/37="AF14SAS.jpg"
/38="AF17SAS.jpg"
/39="AF25SAS.jpg"
/40="AM28SAS.jpg"
/41="AM29SAS.jpg"
/42="AM35SAS.jpg"
/43="AF14SAS.jpg"
/44="AF17SAS.jpg"
/45="AF25SAS.jpg"
/46="AM28SAS.jpg"
/47="AM29SAS.jpg"
/48="AM35SAS.jpg"

/49="AF14ANS.jpg"
/50="AF17ANS.jpg"
/51="AF25ANS.jpg"
/52="AM28ANS.jpg"
/53="AM29ANS.jpg"
/54="AM35ANS.jpg"
/55="AF14ANS.jpg"
/56="AF17ANS.jpg"
/57="AF25ANS.jpg"
/58="AM28ANS.jpg"
/59="AM29ANS.jpg"
/60="AM35ANS.jpg"
/61="AF14ANS.jpg"
/62="AF17ANS.jpg"
/63="AF25ANS.jpg"
/64="AM28ANS.jpg"
/65="AM29ANS.jpg"
/66="AM35ANS.jpg"
/67="AF14ANS.jpg"
/68="AF17ANS.jpg"
/69="AF25ANS.jpg"
/70="AM28ANS.jpg"
/71="AM29ANS.jpg"
/72="AM35ANS.jpg"

/73="AF14SAS.jpg"
/74="AF17SAS.jpg"
/75="AF25SAS.jpg"
/76="AM28SAS.jpg"
/77="AM29SAS.jpg"
/78="AM35SAS.jpg"
/79="AF14SAS.jpg"
/80="AF17SAS.jpg"
/81="AF25SAS.jpg"
/82="AM28SAS.jpg"
/83="AM29SAS.jpg"
/84="AM35SAS.jpg"
/85="AF14SAS.jpg"
/86="AF17SAS.jpg"
/87="AF25SAS.jpg"
/88="AM28SAS.jpg"
/89="AM29SAS.jpg"
/90="AM35SAS.jpg"
/91="AF14SAS.jpg"
/92="AF17SAS.jpg"
/93="AF25SAS.jpg"
/94="AM28SAS.jpg"
/95="AM29SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"

/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"

/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"

/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"

/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"

/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"

/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"

/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"

/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"

/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"

/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = black
/ screencolor = white
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2FRuns = 0
//selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 3
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 5
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.intropractice2F.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>

***********************
Instruction Trials
***********************

trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

//text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
//    if (trial.practice1.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice1.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2F
**************************************************************************************************************
**************************************************************************************************************
<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
//    if (trial.practice2F.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice2F.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [return trial.feedback;]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************
=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]Here, I made some changes to adapt the script to two features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>

<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

//trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-13 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>

<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = practice2FEnd;
    2 = getReady1;
3-98 = testEF;
    99 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = practice1Intro;
2 = practice1;
3 = noreplace(practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************
as the stimuli are about to be run.
I attach the script I changed this way.


You don't need to rely on trial and error.

There is extensive documentation available, which I recommend you make good use of.

For starters, you should work through the Programmer's Manual in its entirety. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf

As for what trials are and how stimulus timings work, see page 23 and onwards.

I appreciate your concern, but I do not have time to study extensively, because job is job and you're forced to do fast pace . Moreover, I am very naive and I am obliged to do this way.
I am sorry for that.
Can you support or not, pleas?

If you are not willing to read the documentation, not just in general, but not even directly relevant parts you're being pointed to because they are pertinent to your questions, I honeslty don''t know how I can help you.

Thank you again and anyway Dave!


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
Igor Iarrobino - 11/26/2024
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Hello here,
You know well this emotional stroop task I'm making by trial-and-error
Here as for the emo dynamic I posted earlier, I should made some changes to adapt the script to the features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).

The script is giving no syntax errors, but it crashes
<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 1 test block.
In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. ... minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = R = left ("anger/rabbia")
                                25 = T = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> practice block is repeated if proportion correct of the last < 100%

2. Practice Block Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent)

3. 1 Test Block: 48 trials * emotion = 96 total trials:
Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "R")
/rightresponsekey:                                the right response key (default: "T")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3500
//feedbackDuration = 1000
/wordPresentationTime_test = 3500
/ITI = 1500
/FixationCross = 500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z" //lo stampino con la R va messo sulla Z
/rightresponsekey = "M" //lo stampino con la T va messo sulla M
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "In questa breve pratica le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.
Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/2 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/3 = "Adesso faremo un training per familiarizzare con l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/4 = "Adesso inizia l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.

Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, le ricordiamo di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/5 = "Grazie per aver partecipato!"
</item>


<item continueButtons>
/1 = "Prema la BARRA per continuare"
/2 = "Prema la BARRA per iniziare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Stop"
/8 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text fixationCross>
/ items = ("+")
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ size = (10%, 10%)
/ txcolor = black
/ erase = 500
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro e prema uno dei due tasti per cominciare";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF14ANS.jpg"
/2 = "AF25SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM28SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF14ANS.jpg"
/2="AF17ANS.jpg"
/3="AF25ANS.jpg"
/4="AM28ANS.jpg"
/5="AM29ANS.jpg"
/6="AM35ANS.jpg"
/7="AF14ANS.jpg"
/8="AF17ANS.jpg"
/9="AF25ANS.jpg"
/10="AM28ANS.jpg"
/11="AM29ANS.jpg"
/12="AM35ANS.jpg"
/13="AF14ANS.jpg"
/14="AF17ANS.jpg"
/15="AF25ANS.jpg"
/16="AM28ANS.jpg"
/17="AM29ANS.jpg"
/18="AM35ANS.jpg"
/19="AF14ANS.jpg"
/20="AF17ANS.jpg"
/21="AF25ANS.jpg"
/22="AM28ANS.jpg"
/23="AM29ANS.jpg"
/24="AM35ANS.jpg"

/25="AF14SAS.jpg"
/26="AF17SAS.jpg"
/27="AF25SAS.jpg"
/28="AM28SAS.jpg"
/29="AM29SAS.jpg"
/30="AM35SAS.jpg"
/31="AF14SAS.jpg"
/32="AF17SAS.jpg"
/33="AF25SAS.jpg"
/34="AM28SAS.jpg"
/35="AM29SAS.jpg"
/36="AM35SAS.jpg"
/37="AF14SAS.jpg"
/38="AF17SAS.jpg"
/39="AF25SAS.jpg"
/40="AM28SAS.jpg"
/41="AM29SAS.jpg"
/42="AM35SAS.jpg"
/43="AF14SAS.jpg"
/44="AF17SAS.jpg"
/45="AF25SAS.jpg"
/46="AM28SAS.jpg"
/47="AM29SAS.jpg"
/48="AM35SAS.jpg"

/49="AF14ANS.jpg"
/50="AF17ANS.jpg"
/51="AF25ANS.jpg"
/52="AM28ANS.jpg"
/53="AM29ANS.jpg"
/54="AM35ANS.jpg"
/55="AF14ANS.jpg"
/56="AF17ANS.jpg"
/57="AF25ANS.jpg"
/58="AM28ANS.jpg"
/59="AM29ANS.jpg"
/60="AM35ANS.jpg"
/61="AF14ANS.jpg"
/62="AF17ANS.jpg"
/63="AF25ANS.jpg"
/64="AM28ANS.jpg"
/65="AM29ANS.jpg"
/66="AM35ANS.jpg"
/67="AF14ANS.jpg"
/68="AF17ANS.jpg"
/69="AF25ANS.jpg"
/70="AM28ANS.jpg"
/71="AM29ANS.jpg"
/72="AM35ANS.jpg"

/73="AF14SAS.jpg"
/74="AF17SAS.jpg"
/75="AF25SAS.jpg"
/76="AM28SAS.jpg"
/77="AM29SAS.jpg"
/78="AM35SAS.jpg"
/79="AF14SAS.jpg"
/80="AF17SAS.jpg"
/81="AF25SAS.jpg"
/82="AM28SAS.jpg"
/83="AM29SAS.jpg"
/84="AM35SAS.jpg"
/85="AF14SAS.jpg"
/86="AF17SAS.jpg"
/87="AF25SAS.jpg"
/88="AM28SAS.jpg"
/89="AM29SAS.jpg"
/90="AM35SAS.jpg"
/91="AF14SAS.jpg"
/92="AF17SAS.jpg"
/93="AF25SAS.jpg"
/94="AM28SAS.jpg"
/95="AM29SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"

/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"

/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"

/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"

/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"

/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"

/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"

/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"

/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"

/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"

/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = black
/ screencolor = white
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2FRuns = 0
//selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 3
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 5
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.intropractice2F.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>

***********************
Instruction Trials
***********************

trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

//text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
//    if (trial.practice1.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice1.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2F
**************************************************************************************************************
**************************************************************************************************************
<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
//    if (trial.practice2F.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice2F.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [return trial.feedback;]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************
=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]Here, I made some changes to adapt the script to two features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>

<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

//trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-13 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>

<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = practice2FEnd;
    2 = getReady1;
3-98 = testEF;
    99 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = practice1Intro;
2 = practice1;
3 = noreplace(practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************
as the stimuli are about to be run.
I attach the script I changed this way.


You don't need to rely on trial and error.

There is extensive documentation available, which I recommend you make good use of.

For starters, you should work through the Programmer's Manual in its entirety. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf

As for what trials are and how stimulus timings work, see page 23 and onwards.

I appreciate your concern, but I do not have time to study extensively, because job is job and you're forced to do fast pace . Moreover, I am very naive and I am obliged to do this way.
I am sorry for that.
Can you support or not, pleas?

If you are not willing to read the documentation, not just in general, but not even directly relevant parts you're being pointed to because they are pertinent to your questions, I honeslty don''t know how I can help you.

Igor Iarrobino
Igor Iarrobino
New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)
Group: Forum Members
Posts: 19, Visits: 50
Dave - 11/26/2024
Igor Iarrobino - 11/26/2024
Hello here,
You know well this emotional stroop task I'm making by trial-and-error
Here as for the emo dynamic I posted earlier, I should made some changes to adapt the script to the features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).

The script is giving no syntax errors, but it crashes
<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 1 test block.
In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. ... minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = R = left ("anger/rabbia")
                                25 = T = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> practice block is repeated if proportion correct of the last < 100%

2. Practice Block Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent)

3. 1 Test Block: 48 trials * emotion = 96 total trials:
Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "R")
/rightresponsekey:                                the right response key (default: "T")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3500
//feedbackDuration = 1000
/wordPresentationTime_test = 3500
/ITI = 1500
/FixationCross = 500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z" //lo stampino con la R va messo sulla Z
/rightresponsekey = "M" //lo stampino con la T va messo sulla M
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "In questa breve pratica le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.
Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/2 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/3 = "Adesso faremo un training per familiarizzare con l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/4 = "Adesso inizia l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.

Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, le ricordiamo di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/5 = "Grazie per aver partecipato!"
</item>


<item continueButtons>
/1 = "Prema la BARRA per continuare"
/2 = "Prema la BARRA per iniziare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Stop"
/8 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text fixationCross>
/ items = ("+")
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ size = (10%, 10%)
/ txcolor = black
/ erase = 500
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro e prema uno dei due tasti per cominciare";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF14ANS.jpg"
/2 = "AF25SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM28SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF14ANS.jpg"
/2="AF17ANS.jpg"
/3="AF25ANS.jpg"
/4="AM28ANS.jpg"
/5="AM29ANS.jpg"
/6="AM35ANS.jpg"
/7="AF14ANS.jpg"
/8="AF17ANS.jpg"
/9="AF25ANS.jpg"
/10="AM28ANS.jpg"
/11="AM29ANS.jpg"
/12="AM35ANS.jpg"
/13="AF14ANS.jpg"
/14="AF17ANS.jpg"
/15="AF25ANS.jpg"
/16="AM28ANS.jpg"
/17="AM29ANS.jpg"
/18="AM35ANS.jpg"
/19="AF14ANS.jpg"
/20="AF17ANS.jpg"
/21="AF25ANS.jpg"
/22="AM28ANS.jpg"
/23="AM29ANS.jpg"
/24="AM35ANS.jpg"

/25="AF14SAS.jpg"
/26="AF17SAS.jpg"
/27="AF25SAS.jpg"
/28="AM28SAS.jpg"
/29="AM29SAS.jpg"
/30="AM35SAS.jpg"
/31="AF14SAS.jpg"
/32="AF17SAS.jpg"
/33="AF25SAS.jpg"
/34="AM28SAS.jpg"
/35="AM29SAS.jpg"
/36="AM35SAS.jpg"
/37="AF14SAS.jpg"
/38="AF17SAS.jpg"
/39="AF25SAS.jpg"
/40="AM28SAS.jpg"
/41="AM29SAS.jpg"
/42="AM35SAS.jpg"
/43="AF14SAS.jpg"
/44="AF17SAS.jpg"
/45="AF25SAS.jpg"
/46="AM28SAS.jpg"
/47="AM29SAS.jpg"
/48="AM35SAS.jpg"

/49="AF14ANS.jpg"
/50="AF17ANS.jpg"
/51="AF25ANS.jpg"
/52="AM28ANS.jpg"
/53="AM29ANS.jpg"
/54="AM35ANS.jpg"
/55="AF14ANS.jpg"
/56="AF17ANS.jpg"
/57="AF25ANS.jpg"
/58="AM28ANS.jpg"
/59="AM29ANS.jpg"
/60="AM35ANS.jpg"
/61="AF14ANS.jpg"
/62="AF17ANS.jpg"
/63="AF25ANS.jpg"
/64="AM28ANS.jpg"
/65="AM29ANS.jpg"
/66="AM35ANS.jpg"
/67="AF14ANS.jpg"
/68="AF17ANS.jpg"
/69="AF25ANS.jpg"
/70="AM28ANS.jpg"
/71="AM29ANS.jpg"
/72="AM35ANS.jpg"

/73="AF14SAS.jpg"
/74="AF17SAS.jpg"
/75="AF25SAS.jpg"
/76="AM28SAS.jpg"
/77="AM29SAS.jpg"
/78="AM35SAS.jpg"
/79="AF14SAS.jpg"
/80="AF17SAS.jpg"
/81="AF25SAS.jpg"
/82="AM28SAS.jpg"
/83="AM29SAS.jpg"
/84="AM35SAS.jpg"
/85="AF14SAS.jpg"
/86="AF17SAS.jpg"
/87="AF25SAS.jpg"
/88="AM28SAS.jpg"
/89="AM29SAS.jpg"
/90="AM35SAS.jpg"
/91="AF14SAS.jpg"
/92="AF17SAS.jpg"
/93="AF25SAS.jpg"
/94="AM28SAS.jpg"
/95="AM29SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"

/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"

/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"

/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"

/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"

/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"

/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"

/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"

/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"

/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"

/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = black
/ screencolor = white
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2FRuns = 0
//selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 3
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 5
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.intropractice2F.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>

***********************
Instruction Trials
***********************

trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

//text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
//    if (trial.practice1.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice1.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2F
**************************************************************************************************************
**************************************************************************************************************
<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
//    if (trial.practice2F.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice2F.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [return trial.feedback;]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************
=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]Here, I made some changes to adapt the script to two features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>

<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

//trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-13 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>

<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = practice2FEnd;
    2 = getReady1;
3-98 = testEF;
    99 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = practice1Intro;
2 = practice1;
3 = noreplace(practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************
as the stimuli are about to be run.
I attach the script I changed this way.


You don't need to rely on trial and error.

There is extensive documentation available, which I recommend you make good use of.

For starters, you should work through the Programmer's Manual in its entirety. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf

As for what trials are and how stimulus timings work, see page 23 and onwards.

I appreciate your concern, but I do not have time to study extensively, because job is job and you're forced to do fast pace . Moreover, I am very naive and I am obliged to do this way.
I am sorry for that.
Can you support or not, pleas?



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
Igor Iarrobino - 11/26/2024
Hello here,
You know well this emotional stroop task I'm making by trial-and-error
Here as for the emo dynamic I posted earlier, I should made some changes to adapt the script to the features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).

The script is giving no syntax errors, but it crashes
<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 1 test block.
In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. ... minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = R = left ("anger/rabbia")
                                25 = T = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> practice block is repeated if proportion correct of the last < 100%

2. Practice Block Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent)

3. 1 Test Block: 48 trials * emotion = 96 total trials:
Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "R")
/rightresponsekey:                                the right response key (default: "T")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3500
//feedbackDuration = 1000
/wordPresentationTime_test = 3500
/ITI = 1500
/FixationCross = 500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z" //lo stampino con la R va messo sulla Z
/rightresponsekey = "M" //lo stampino con la T va messo sulla M
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "In questa breve pratica le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.
Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/2 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/3 = "Adesso faremo un training per familiarizzare con l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/4 = "Adesso inizia l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.

Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, le ricordiamo di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/5 = "Grazie per aver partecipato!"
</item>


<item continueButtons>
/1 = "Prema la BARRA per continuare"
/2 = "Prema la BARRA per iniziare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Stop"
/8 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text fixationCross>
/ items = ("+")
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ size = (10%, 10%)
/ txcolor = black
/ erase = 500
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro e prema uno dei due tasti per cominciare";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF14ANS.jpg"
/2 = "AF25SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM28SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF14ANS.jpg"
/2="AF17ANS.jpg"
/3="AF25ANS.jpg"
/4="AM28ANS.jpg"
/5="AM29ANS.jpg"
/6="AM35ANS.jpg"
/7="AF14ANS.jpg"
/8="AF17ANS.jpg"
/9="AF25ANS.jpg"
/10="AM28ANS.jpg"
/11="AM29ANS.jpg"
/12="AM35ANS.jpg"
/13="AF14ANS.jpg"
/14="AF17ANS.jpg"
/15="AF25ANS.jpg"
/16="AM28ANS.jpg"
/17="AM29ANS.jpg"
/18="AM35ANS.jpg"
/19="AF14ANS.jpg"
/20="AF17ANS.jpg"
/21="AF25ANS.jpg"
/22="AM28ANS.jpg"
/23="AM29ANS.jpg"
/24="AM35ANS.jpg"

/25="AF14SAS.jpg"
/26="AF17SAS.jpg"
/27="AF25SAS.jpg"
/28="AM28SAS.jpg"
/29="AM29SAS.jpg"
/30="AM35SAS.jpg"
/31="AF14SAS.jpg"
/32="AF17SAS.jpg"
/33="AF25SAS.jpg"
/34="AM28SAS.jpg"
/35="AM29SAS.jpg"
/36="AM35SAS.jpg"
/37="AF14SAS.jpg"
/38="AF17SAS.jpg"
/39="AF25SAS.jpg"
/40="AM28SAS.jpg"
/41="AM29SAS.jpg"
/42="AM35SAS.jpg"
/43="AF14SAS.jpg"
/44="AF17SAS.jpg"
/45="AF25SAS.jpg"
/46="AM28SAS.jpg"
/47="AM29SAS.jpg"
/48="AM35SAS.jpg"

/49="AF14ANS.jpg"
/50="AF17ANS.jpg"
/51="AF25ANS.jpg"
/52="AM28ANS.jpg"
/53="AM29ANS.jpg"
/54="AM35ANS.jpg"
/55="AF14ANS.jpg"
/56="AF17ANS.jpg"
/57="AF25ANS.jpg"
/58="AM28ANS.jpg"
/59="AM29ANS.jpg"
/60="AM35ANS.jpg"
/61="AF14ANS.jpg"
/62="AF17ANS.jpg"
/63="AF25ANS.jpg"
/64="AM28ANS.jpg"
/65="AM29ANS.jpg"
/66="AM35ANS.jpg"
/67="AF14ANS.jpg"
/68="AF17ANS.jpg"
/69="AF25ANS.jpg"
/70="AM28ANS.jpg"
/71="AM29ANS.jpg"
/72="AM35ANS.jpg"

/73="AF14SAS.jpg"
/74="AF17SAS.jpg"
/75="AF25SAS.jpg"
/76="AM28SAS.jpg"
/77="AM29SAS.jpg"
/78="AM35SAS.jpg"
/79="AF14SAS.jpg"
/80="AF17SAS.jpg"
/81="AF25SAS.jpg"
/82="AM28SAS.jpg"
/83="AM29SAS.jpg"
/84="AM35SAS.jpg"
/85="AF14SAS.jpg"
/86="AF17SAS.jpg"
/87="AF25SAS.jpg"
/88="AM28SAS.jpg"
/89="AM29SAS.jpg"
/90="AM35SAS.jpg"
/91="AF14SAS.jpg"
/92="AF17SAS.jpg"
/93="AF25SAS.jpg"
/94="AM28SAS.jpg"
/95="AM29SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"

/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"

/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"

/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"

/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"

/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"

/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"

/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"

/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"

/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"

/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = black
/ screencolor = white
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2FRuns = 0
//selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 3
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 5
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.intropractice2F.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>

***********************
Instruction Trials
***********************

trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

//text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
//    if (trial.practice1.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice1.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2F
**************************************************************************************************************
**************************************************************************************************************
<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
//    if (trial.practice2F.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice2F.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [return trial.feedback;]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************
=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]Here, I made some changes to adapt the script to two features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>

<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

//trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-13 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>

<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = practice2FEnd;
    2 = getReady1;
3-98 = testEF;
    99 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = practice1Intro;
2 = practice1;
3 = noreplace(practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************
as the stimuli are about to be run.
I attach the script I changed this way.


You don't need to rely on trial and error.

There is extensive documentation available, which I recommend you make good use of.

For starters, you should work through the Programmer's Manual in its entirety. https://www.millisecond.com/support/Inquisit%20Programmer's%20Manual.pdf

As for what trials are and how stimulus timings work, see page 23 and onwards.
Igor Iarrobino
Igor Iarrobino
New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)
Group: Forum Members
Posts: 19, Visits: 50
Hello here,
You know well this emotional stroop task I'm making by trial-and-error
Here as for the emo dynamic I posted earlier, I should made some changes to adapt the script to the features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).

The script is giving no syntax errors, but it crashes
<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 1 test block.
In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. ... minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = R = left ("anger/rabbia")
                                25 = T = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> practice block is repeated if proportion correct of the last < 100%

2. Practice Block Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent)

3. 1 Test Block: 48 trials * emotion = 96 total trials:
Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "R")
/rightresponsekey:                                the right response key (default: "T")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3500
//feedbackDuration = 1000
/wordPresentationTime_test = 3500
/ITI = 1500
/FixationCross = 500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z" //lo stampino con la R va messo sulla Z
/rightresponsekey = "M" //lo stampino con la T va messo sulla M
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "In questa breve pratica le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.
Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/2 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/3 = "Adesso faremo un training per familiarizzare con l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/4 = "Adesso inizia l'esperimento.
Le compariranno dei volti emotivi sui quali sono sovraimpresse delle parole emotive.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure di TRISTEZZA.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.

Le ricordiamo:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, le ricordiamo di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/5 = "Grazie per aver partecipato!"
</item>


<item continueButtons>
/1 = "Prema la BARRA per continuare"
/2 = "Prema la BARRA per iniziare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Stop"
/8 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text fixationCross>
/ items = ("+")
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ size = (10%, 10%)
/ txcolor = black
/ erase = 500
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro e prema uno dei due tasti per cominciare";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF14ANS.jpg"
/2 = "AF25SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM28SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF14ANS.jpg"
/2="AF17ANS.jpg"
/3="AF25ANS.jpg"
/4="AM28ANS.jpg"
/5="AM29ANS.jpg"
/6="AM35ANS.jpg"
/7="AF14ANS.jpg"
/8="AF17ANS.jpg"
/9="AF25ANS.jpg"
/10="AM28ANS.jpg"
/11="AM29ANS.jpg"
/12="AM35ANS.jpg"
/13="AF14ANS.jpg"
/14="AF17ANS.jpg"
/15="AF25ANS.jpg"
/16="AM28ANS.jpg"
/17="AM29ANS.jpg"
/18="AM35ANS.jpg"
/19="AF14ANS.jpg"
/20="AF17ANS.jpg"
/21="AF25ANS.jpg"
/22="AM28ANS.jpg"
/23="AM29ANS.jpg"
/24="AM35ANS.jpg"

/25="AF14SAS.jpg"
/26="AF17SAS.jpg"
/27="AF25SAS.jpg"
/28="AM28SAS.jpg"
/29="AM29SAS.jpg"
/30="AM35SAS.jpg"
/31="AF14SAS.jpg"
/32="AF17SAS.jpg"
/33="AF25SAS.jpg"
/34="AM28SAS.jpg"
/35="AM29SAS.jpg"
/36="AM35SAS.jpg"
/37="AF14SAS.jpg"
/38="AF17SAS.jpg"
/39="AF25SAS.jpg"
/40="AM28SAS.jpg"
/41="AM29SAS.jpg"
/42="AM35SAS.jpg"
/43="AF14SAS.jpg"
/44="AF17SAS.jpg"
/45="AF25SAS.jpg"
/46="AM28SAS.jpg"
/47="AM29SAS.jpg"
/48="AM35SAS.jpg"

/49="AF14ANS.jpg"
/50="AF17ANS.jpg"
/51="AF25ANS.jpg"
/52="AM28ANS.jpg"
/53="AM29ANS.jpg"
/54="AM35ANS.jpg"
/55="AF14ANS.jpg"
/56="AF17ANS.jpg"
/57="AF25ANS.jpg"
/58="AM28ANS.jpg"
/59="AM29ANS.jpg"
/60="AM35ANS.jpg"
/61="AF14ANS.jpg"
/62="AF17ANS.jpg"
/63="AF25ANS.jpg"
/64="AM28ANS.jpg"
/65="AM29ANS.jpg"
/66="AM35ANS.jpg"
/67="AF14ANS.jpg"
/68="AF17ANS.jpg"
/69="AF25ANS.jpg"
/70="AM28ANS.jpg"
/71="AM29ANS.jpg"
/72="AM35ANS.jpg"

/73="AF14SAS.jpg"
/74="AF17SAS.jpg"
/75="AF25SAS.jpg"
/76="AM28SAS.jpg"
/77="AM29SAS.jpg"
/78="AM35SAS.jpg"
/79="AF14SAS.jpg"
/80="AF17SAS.jpg"
/81="AF25SAS.jpg"
/82="AM28SAS.jpg"
/83="AM29SAS.jpg"
/84="AM35SAS.jpg"
/85="AF14SAS.jpg"
/86="AF17SAS.jpg"
/87="AF25SAS.jpg"
/88="AM28SAS.jpg"
/89="AM29SAS.jpg"
/90="AM35SAS.jpg"
/91="AF14SAS.jpg"
/92="AF17SAS.jpg"
/93="AF25SAS.jpg"
/94="AM28SAS.jpg"
/95="AM29SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"

/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"

/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"

/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"

/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"

/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"

/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"

/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"

/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"

/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"

/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = black
/ screencolor = white
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2FRuns = 0
//selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 3
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 5
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.intropractice2F.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>

***********************
Instruction Trials
***********************

trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

//text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
//    if (trial.practice1.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice1.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2F
**************************************************************************************************************
**************************************************************************************************************
<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
//    if (trial.practice2F.correct) {
//        values.selectFeedback = 1;
//        text.feedback.textcolor = green;
//    } else if (trial.practice2F.response != 0) {
//        values.selectFeedback = 2;
//        text.feedback.textcolor = red;
//    } else {
//        values.selectFeedback = 3;
//        text.feedback.textcolor = blue;
//    };
]
/ trialduration = parameters.wordPresentationTime_practice
// branch = [return trial.feedback;]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************
=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder; 2 = fixationCross]Here, I made some changes to adapt the script to two features that I need.
I need the following characteristics:
- the response erase the stimulus;
- the stimulus disappear after 5000ms if no response is coming;
- to add a fixation cross before each stimulus (after clearscreen).
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>

<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

//trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-13 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>

<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = practice2FEnd;
    2 = getReady1;
3-98 = testEF;
    99 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = practice1Intro;
2 = practice1;
3 = noreplace(practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************
as the stimuli are about to be run.
I attach the script I changed this way.




Igor Iarrobino
Igor Iarrobino
New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)
Group: Forum Members
Posts: 19, Visits: 50
Dave - 11/23/2024
Igor Iarrobino - 11/23/2024
Hello again,
hope you're doing good!
I have a new issue to solve about this EmoStroop script.
The structure of the script is unchanged, but I had to make some modifications on it: that is changing the emotions of interest and the response buttons, and increasing the number of stimuli/trials in each block, both practice and test blocks.
The latter aspect gives me the problem, and the problem is:
I doubled up the trials in almost each block (from 6 to 12 in practice1; from 48 to 96 in testEW & EF blocks), but the output keeps giving me the same number of trials and, furthermore, it seems it keeps letting out the same trials everytime (but not sure of this).

May you help me out solving this problem???

I have the same issue also in a EmoDynamic task, but I'm gonna try to figure out if I can solve this one by myself with your clues and hints about the Emo Stroop.

Thank you very much in advance!

<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 2 test blocks: one block presents an equal number of congruent and incongruent pairings. In one block, the participant have to respond to the emotional word.
In another block, the participant have to respond to the emotional face.
Block order is determined randomly.

In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. 15 minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = Z = left ("anger/rabbia")
                                25 = M = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> feedback provided
=> practice block is repeated if proportion correct of the last 8 trials is < 100%

2. 2 Practice Blocks Word and Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent) each

1) Respond to Word
2) Respond to Face

For both:
=> feedback provided
=> practice block is repeated if proportion correct is < 100%


3. 2 Test Blocks: 48 trials * emotion = 96 total trials in each block

(1) Respond to Word - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

(2) Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)
    
Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms (during practice: ITI provides feedback for 2000ms)

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "Z")
/rightresponsekey:                                the right response key (default: "M")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3000
/feedbackDuration = 1000
/wordPresentationTime_test = 3000
/ITI = 1500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z"
/rightresponsekey = "M"
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "

EMOTIONAL STROOP"

/2 = "PRATICA LESSICO

In questa breve pratica iniziale le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.

Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/3 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/4 = "PRATICA PAROLA
Le compariranno delle parole emotive sovraimpresse su di un volto che, a sua volta, esprime un'emozione.
Le verrà chiesto di riconoscere se la PAROLA presentata esprime un'emozione di DISGUSTO, oppure se essa esprime un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere alla PAROLA, ignorando il volto che ne fa da sfondo.
Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/5 = "Grazie per aver svolto la prova.

Adesso svolgerà il test.

Prema la BARRA per continuare"

/6 = "PRATICA VOLTO
Le compariranno dei volti emotivi su cui sono sovraimpresse delle parole che, a loro volta, esprimono un'emozione.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure se esso esprime un'emozione di PAURA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/7 = "Grazie per aver svolto la prova.

Prema la BARRA per andare al Test"

/8 = "TEST PAROLA.
Le compariranno delle parole emotive sovraimpresse su un volto che, a sua volta, esprime un'emozione.
Le verrà chiesto di riconoscere se le PAROLE presentate esprimino un'emozione di RABBIA, oppure se esse esprimino un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere alle PAROLE, ignorando i volti che ne fanno da sfondo."

/9 = "Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, ricordi di rispondere tenendo in cosiderazione soltanto le PAROLE!"

/10 = "TEST VOLTO
Le compariranno dei volti emotivi su cui sono sovraimpresse delle parole che, a loro volta, esprimono un'emozione.
Le verrà chiesto di riconoscere se i VOLTI presentati esprimino un'emozione di RABBIA, oppure se essi esprimino un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere ai VOLTI, ignorando le parole sovraimpresse ad essi."

/11 = "Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, ricordi di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/12 = "Lei è a metà strada!"

/13 = "Grazie per aver partecipato!"

/14 = "Grazie per aver svolto la prima prova."

</item>


<item continueButtons>
/1 = "Prema la BARRA per iniziare"
/2 = "Prema la BARRA per continuare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Prema la BARRA per continuare"
/8 = "Prema la BARRA per continuare"
/9 = "Prema la BARRA per iniziare"
/10 = "Prema la BARRA per continuare"
/11 = "Prema la BARRA per iniziare"
/12 = "Prema la BARRA per continuare"
/13 = "Stop"
/14 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2W>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2W (W = word response block)
********************************************

<list practice2W_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2W>
/1 = "AF02ANS.jpg"
/2 = "AF35SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM05SAS.jpg"
</item>

<item words_practice2W>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2W>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2W>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2W>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "tristeButton"
/4 = "rabbiaButton"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF02ANS.jpg"
/2 = "AF35SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM05SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEW
(E = equal number of congruent and incongruent pairings; W = word response block)
****************************

<list testEW_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEW>
/1="AF02ANS.jpg"
/2="AF33ANS.jpg"
/3="AF35ANS.jpg"
/4="AM05ANS.jpg"
/5="AM32ANS.jpg"
/6="AM35ANS.jpg"
/7="AF02ANS.jpg"
/8="AF33ANS.jpg"
/9="AF35ANS.jpg"
/10="AM05ANS.jpg"
/11="AM32ANS.jpg"
/12="AM35ANS.jpg"
/13="AF02ANS.jpg"
/14="AF33ANS.jpg"
/15="AF35ANS.jpg"
/16="AM05ANS.jpg"
/17="AM32ANS.jpg"
/18="AM35ANS.jpg"
/19="AF02ANS.jpg"
/20="AF33ANS.jpg"
/21="AF35ANS.jpg"
/22="AM05ANS.jpg"
/23="AM32ANS.jpg"
/24="AM35ANS.jpg"
/25="AF02SAS.jpg"
/26="AF33SAS.jpg"
/27="AF35SAS.jpg"
/28="AM05SAS.jpg"
/29="AM32SAS.jpg"
/30="AM35SAS.jpg"
/31="AF02SAS.jpg"
/32="AF33SAS.jpg"
/33="AF35SAS.jpg"
/34="AM05SAS.jpg"
/35="AM32SAS.jpg"
/36="AM35SAS.jpg"
/37="AF02SAS.jpg"
/38="AF33SAS.jpg"
/39="AF35SAS.jpg"
/40="AM05SAS.jpg"
/41="AM32SAS.jpg"
/42="AM35SAS.jpg"
/43="AF02SAS.jpg"
/44="AF33SAS.jpg"
/45="AF35SAS.jpg"
/46="AM05SAS.jpg"
/47="AM32SAS.jpg"
/48="AM35SAS.jpg"
/49="AF02ANS.jpg"
/50="AF33ANS.jpg"
/51="AF35ANS.jpg"
/52="AM05ANS.jpg"
/53="AM32ANS.jpg"
/54="AM35ANS.jpg"
/55="AF02ANS.jpg"
/56="AF33ANS.jpg"
/57="AF35ANS.jpg"
/58="AM05ANS.jpg"
/59="AM32ANS.jpg"
/60="AM35ANS.jpg"
/61="AF02ANS.jpg"
/62="AF33ANS.jpg"
/63="AF35ANS.jpg"
/64="AM05ANS.jpg"
/65="AM32ANS.jpg"
/66="AM35ANS.jpg"
/67="AF02ANS.jpg"
/68="AF33ANS.jpg"
/69="AF35ANS.jpg"
/70="AM05ANS.jpg"
/71="AM32ANS.jpg"
/72="AM35ANS.jpg"
/73="AF02SAS.jpg"
/74="AF33SAS.jpg"
/75="AF35SAS.jpg"
/76="AM05SAS.jpg"
/77="AM32SAS.jpg"
/78="AM35SAS.jpg"
/79="AF02SAS.jpg"
/80="AF33SAS.jpg"
/81="AF35SAS.jpg"
/82="AM05SAS.jpg"
/83="AM32SAS.jpg"
/84="AM35SAS.jpg"
/85="AF02SAS.jpg"
/86="AF33SAS.jpg"
/87="AF35SAS.jpg"
/88="AM05SAS.jpg"
/89="AM32SAS.jpg"
/90="AM35SAS.jpg"
/91="AF02SAS.jpg"
/92="AF33SAS.jpg"
/93="AF35SAS.jpg"
/94="AM05SAS.jpg"
/95="AM32SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEW>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"
/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"
/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"
/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"
/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"
/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"
/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"
/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEW>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1)
/ select = values.selectStim
</list>

<item correctButton_testEW>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="tristeButton"
/14="tristeButton"
/15="tristeButton"
/16="tristeButton"
/17="tristeButton"
/18="tristeButton"
/19="tristeButton"
/20="tristeButton"
/21="tristeButton"
/22="tristeButton"
/23="tristeButton"
/24="tristeButton"
/25="rabbiaButton"
/26="rabbiaButton"
/27="rabbiaButton"
/28="rabbiaButton"
/29="rabbiaButton"
/30="rabbiaButton"
/31="rabbiaButton"
/32="rabbiaButton"
/33="rabbiaButton"
/34="rabbiaButton"
/35="rabbiaButton"
/36="rabbiaButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"
/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="tristeButton"
/62="tristeButton"
/63="tristeButton"
/64="tristeButton"
/65="tristeButton"
/66="tristeButton"
/67="tristeButton"
/68="tristeButton"
/69="tristeButton"
/70="tristeButton"
/71="tristeButton"
/72="tristeButton"
/73="rabbiaButton"
/74="rabbiaButton"
/75="rabbiaButton"
/76="rabbiaButton"
/77="rabbiaButton"
/78="rabbiaButton"
/79="rabbiaButton"
/80="rabbiaButton"
/81="rabbiaButton"
/82="rabbiaButton"
/83="rabbiaButton"
/84="rabbiaButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF02ANS.jpg"
/2="AF33ANS.jpg"
/3="AF35ANS.jpg"
/4="AM05ANS.jpg"
/5="AM32ANS.jpg"
/6="AM35ANS.jpg"
/7="AF02ANS.jpg"
/8="AF33ANS.jpg"
/9="AF35ANS.jpg"
/10="AM05ANS.jpg"
/11="AM32ANS.jpg"
/12="AM35ANS.jpg"
/13="AF02ANS.jpg"
/14="AF33ANS.jpg"
/15="AF35ANS.jpg"
/16="AM05ANS.jpg"
/17="AM32ANS.jpg"
/18="AM35ANS.jpg"
/19="AF02ANS.jpg"
/20="AF33ANS.jpg"
/21="AF35ANS.jpg"
/22="AM05ANS.jpg"
/23="AM32ANS.jpg"
/24="AM35ANS.jpg"
/25="AF02SAS.jpg"
/26="AF33SAS.jpg"
/27="AF35SAS.jpg"
/28="AM05SAS.jpg"
/29="AM32SAS.jpg"
/30="AM35SAS.jpg"
/31="AF02SAS.jpg"
/32="AF33SAS.jpg"
/33="AF35SAS.jpg"
/34="AM05SAS.jpg"
/35="AM32SAS.jpg"
/36="AM35SAS.jpg"
/37="AF02SAS.jpg"
/38="AF33SAS.jpg"
/39="AF35SAS.jpg"
/40="AM05SAS.jpg"
/41="AM32SAS.jpg"
/42="AM35SAS.jpg"
/43="AF02SAS.jpg"
/44="AF33SAS.jpg"
/45="AF35SAS.jpg"
/46="AM05SAS.jpg"
/47="AM32SAS.jpg"
/48="AM35SAS.jpg"
/49="AF02ANS.jpg"
/50="AF33ANS.jpg"
/51="AF35ANS.jpg"
/52="AM05ANS.jpg"
/53="AM32ANS.jpg"
/54="AM35ANS.jpg"
/55="AF02ANS.jpg"
/56="AF33ANS.jpg"
/57="AF35ANS.jpg"
/58="AM05ANS.jpg"
/59="AM32ANS.jpg"
/60="AM35ANS.jpg"
/61="AF02ANS.jpg"
/62="AF33ANS.jpg"
/63="AF35ANS.jpg"
/64="AM05ANS.jpg"
/65="AM32ANS.jpg"
/66="AM35ANS.jpg"
/67="AF02ANS.jpg"
/68="AF33ANS.jpg"
/69="AF35ANS.jpg"
/70="AM05ANS.jpg"
/71="AM32ANS.jpg"
/72="AM35ANS.jpg"
/73="AF02SAS.jpg"
/74="AF33SAS.jpg"
/75="AF35SAS.jpg"
/76="AM05SAS.jpg"
/77="AM32SAS.jpg"
/78="AM35SAS.jpg"
/79="AF02SAS.jpg"
/80="AF33SAS.jpg"
/81="AF35SAS.jpg"
/82="AM05SAS.jpg"
/83="AM32SAS.jpg"
/84="AM35SAS.jpg"
/85="AF02SAS.jpg"
/86="AF33SAS.jpg"
/87="AF35SAS.jpg"
/88="AM05SAS.jpg"
/89="AM32SAS.jpg"
/90="AM35SAS.jpg"
/91="AF02SAS.jpg"
/92="AF33SAS.jpg"
/93="AF35SAS.jpg"
/94="AM05SAS.jpg"
/95="AM32SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"
/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"
/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"
/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"
/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"
/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"
/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"
/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"
/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"
/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"
/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = white
/ screencolor = (152, 133, 101)
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2WRuns,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_WORD,
expressions.ACC_WORDCongruent,
expressions.ACC_WORDIncongruent,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_WORD,
expressions.meanRT_WORDCongruent,
expressions.meanRT_WORDIncongruent,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2WRuns = 0
/practice2FRuns = 0
/selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_WORD:                     proportion correct in "WORD" block
/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_WORD:             mean correct latency (in ms) in "WORD" block
/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_WORD = list.accuracyEW.mean
/ACC_WORDCongruent = list.accuracyEWCongruent.mean
/ACC_WORDIncongruent = list.accuracyEWIncongruent.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_WORD = list.latenciesEW.mean
/meanRT_WORDCongruent = list.latenciesEWCongruent.mean
/meanRT_WORDIncongruent = list.latenciesEWIncongruent.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2W>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 6
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2W>
/ items = instructions
/ select = 14
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F1>
/ items = instructions
/ select = 7
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F2>
/ items = instructions
/ select = 8
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F3>
/ items = instructions
/ select = 9
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text newBlock1>
/ items = instructions
/ select = 10
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text newBlock2>
/ items = instructions
/ select = 11
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text break>
/ items = instructions
/ select = 12
/ position = (50%, 50%)
/ fontstyle = ("Arial", 6%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 13
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.newBlock1.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>



***********************
Instruction Trials
***********************

<trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

<trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2WStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2W, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2WEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2W, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F1, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock1>

/ stimulusframes = [1 = finishpractice2F2, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock1a>

/ stimulusframes = [1 = finishpractice2F3, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock2>

/ stimulusframes = [1 = newBlock1, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock2a>

/ stimulusframes = [1 = newBlock2, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial break>
/ skip = [
    values.countTestBlocks > 1;
]
/ ontrialbegin = [
    text.continueButton_Pnd.textbgcolor = blue;
]
/ stimulusframes = [1 = clearscreen, break, continueButton_Pnd]
/ validresponse = (" ")
/ recorddata = false
/ ontrialend = [
    text.continueButton_Pnd.textbgcolor = red;
]
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2W>
/ items = item.words_practice2W
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2W>
/items = pics_practice2W
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEW>
/ items = item.words_testEW
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEW>
/items = pics_testEW
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEW>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEWCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEWIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEW>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEWCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEWIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
    if (trial.practice1.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice1.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2W & 2F
**************************************************************************************************************
**************************************************************************************************************

<trial practice2W>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2W_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2W.nextvalue;
    values.correctButton = item.correctButton_practice2W.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, pic_practice2W, Word_practice2W, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2W.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2W.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2W.correct);
    values.ACC_practice2 = list.accuracy.mean;
    if (trial.practice2W.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice2W.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>



<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, pic_practice2W, Word_practice2W, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
    if (trial.practice2F.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice2F.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************

=> EW: Equal number congruent/incongruent pairs - WORD Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEW>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEW_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEW.nextvalue;
    values.correctButton = item.correctButton_testEW.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
/ stimulusframes = [1 = clearscreen, pic_testEW, Word_testEW, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEW.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEW.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEW.correct);
    list.accuracyEW.appendItem(trial.testEW.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEW.correct);
        list.accuracyEWCongruent.appenditem(trial.testEW.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEW.correct);
        list.accuracyEWIncongruent.appenditem(trial.testEW.correct);
    };
    if (trial.testEW.correct) {
        list.latencies.appendItem(trial.testEW.latency);
        list.latenciesEW.appendItem(trial.testEW.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEW.latency);
            list.latenciesEWCongruent.appendItem(trial.testEW.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEW.latency);
            list.latenciesEWIncongruent.appendItem(trial.testEW.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, pic_testEF, Word_testEF, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>


<trial repeatPractice2W>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2W, continueButton_intro]
/ validresponse = (" ")
</trial>


<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

<trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

<block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-7 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>


<block practice2WIntro>
/ trials = [1 = practice2WStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2W;
]
</block>

<block practice2W>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2WRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2W]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2W;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEW;
};
]
</block>

<block repeatPractice2W>
/ trials = [1=repeatPractice2W]
/ branch = [
return block.practice2W;
]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>


<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEW>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = nextBlock1;
    2 = nextBlock1a;
    3 = getReady1;
4-51 = testEW;
    52 = break;
    53 = finish;
]
</block>


<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = nextBlock2;
    2 = nextBlock2a;
    3 = getReady1;
4-51 = testEF;
    52 = break;
    53 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = intro;
2 = practice1Intro;
3 = practice1;
4-5 = noreplace(practice2WIntro, practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************

> I doubled up the trials in almost each block (from 6 to 12 in practice1; from 48 to 96 in testEW & EF blocks)

You didn't.



The practice1 block still runs only 6 trials, not 12.



The testEW block still runs only 48 trials, not 96. Same for the testEF block.



Ohhhh so stupid by my side!
Sorry fore bothering you.
Have a nice weekend!
Igor


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
Igor Iarrobino - 11/23/2024
Hello again,
hope you're doing good!
I have a new issue to solve about this EmoStroop script.
The structure of the script is unchanged, but I had to make some modifications on it: that is changing the emotions of interest and the response buttons, and increasing the number of stimuli/trials in each block, both practice and test blocks.
The latter aspect gives me the problem, and the problem is:
I doubled up the trials in almost each block (from 6 to 12 in practice1; from 48 to 96 in testEW & EF blocks), but the output keeps giving me the same number of trials and, furthermore, it seems it keeps letting out the same trials everytime (but not sure of this).

May you help me out solving this problem???

I have the same issue also in a EmoDynamic task, but I'm gonna try to figure out if I can solve this one by myself with your clues and hints about the Emo Stroop.

Thank you very much in advance!

<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 2 test blocks: one block presents an equal number of congruent and incongruent pairings. In one block, the participant have to respond to the emotional word.
In another block, the participant have to respond to the emotional face.
Block order is determined randomly.

In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. 15 minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = Z = left ("anger/rabbia")
                                25 = M = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> feedback provided
=> practice block is repeated if proportion correct of the last 8 trials is < 100%

2. 2 Practice Blocks Word and Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent) each

1) Respond to Word
2) Respond to Face

For both:
=> feedback provided
=> practice block is repeated if proportion correct is < 100%


3. 2 Test Blocks: 48 trials * emotion = 96 total trials in each block

(1) Respond to Word - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

(2) Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)
    
Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms (during practice: ITI provides feedback for 2000ms)

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "Z")
/rightresponsekey:                                the right response key (default: "M")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3000
/feedbackDuration = 1000
/wordPresentationTime_test = 3000
/ITI = 1500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z"
/rightresponsekey = "M"
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "

EMOTIONAL STROOP"

/2 = "PRATICA LESSICO

In questa breve pratica iniziale le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.

Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/3 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/4 = "PRATICA PAROLA
Le compariranno delle parole emotive sovraimpresse su di un volto che, a sua volta, esprime un'emozione.
Le verrà chiesto di riconoscere se la PAROLA presentata esprime un'emozione di DISGUSTO, oppure se essa esprime un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere alla PAROLA, ignorando il volto che ne fa da sfondo.
Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/5 = "Grazie per aver svolto la prova.

Adesso svolgerà il test.

Prema la BARRA per continuare"

/6 = "PRATICA VOLTO
Le compariranno dei volti emotivi su cui sono sovraimpresse delle parole che, a loro volta, esprimono un'emozione.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure se esso esprime un'emozione di PAURA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/7 = "Grazie per aver svolto la prova.

Prema la BARRA per andare al Test"

/8 = "TEST PAROLA.
Le compariranno delle parole emotive sovraimpresse su un volto che, a sua volta, esprime un'emozione.
Le verrà chiesto di riconoscere se le PAROLE presentate esprimino un'emozione di RABBIA, oppure se esse esprimino un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere alle PAROLE, ignorando i volti che ne fanno da sfondo."

/9 = "Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, ricordi di rispondere tenendo in cosiderazione soltanto le PAROLE!"

/10 = "TEST VOLTO
Le compariranno dei volti emotivi su cui sono sovraimpresse delle parole che, a loro volta, esprimono un'emozione.
Le verrà chiesto di riconoscere se i VOLTI presentati esprimino un'emozione di RABBIA, oppure se essi esprimino un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere ai VOLTI, ignorando le parole sovraimpresse ad essi."

/11 = "Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, ricordi di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/12 = "Lei è a metà strada!"

/13 = "Grazie per aver partecipato!"

/14 = "Grazie per aver svolto la prima prova."

</item>


<item continueButtons>
/1 = "Prema la BARRA per iniziare"
/2 = "Prema la BARRA per continuare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Prema la BARRA per continuare"
/8 = "Prema la BARRA per continuare"
/9 = "Prema la BARRA per iniziare"
/10 = "Prema la BARRA per continuare"
/11 = "Prema la BARRA per iniziare"
/12 = "Prema la BARRA per continuare"
/13 = "Stop"
/14 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2W>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2W (W = word response block)
********************************************

<list practice2W_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2W>
/1 = "AF02ANS.jpg"
/2 = "AF35SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM05SAS.jpg"
</item>

<item words_practice2W>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2W>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2W>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2W>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "tristeButton"
/4 = "rabbiaButton"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF02ANS.jpg"
/2 = "AF35SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM05SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEW
(E = equal number of congruent and incongruent pairings; W = word response block)
****************************

<list testEW_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEW>
/1="AF02ANS.jpg"
/2="AF33ANS.jpg"
/3="AF35ANS.jpg"
/4="AM05ANS.jpg"
/5="AM32ANS.jpg"
/6="AM35ANS.jpg"
/7="AF02ANS.jpg"
/8="AF33ANS.jpg"
/9="AF35ANS.jpg"
/10="AM05ANS.jpg"
/11="AM32ANS.jpg"
/12="AM35ANS.jpg"
/13="AF02ANS.jpg"
/14="AF33ANS.jpg"
/15="AF35ANS.jpg"
/16="AM05ANS.jpg"
/17="AM32ANS.jpg"
/18="AM35ANS.jpg"
/19="AF02ANS.jpg"
/20="AF33ANS.jpg"
/21="AF35ANS.jpg"
/22="AM05ANS.jpg"
/23="AM32ANS.jpg"
/24="AM35ANS.jpg"
/25="AF02SAS.jpg"
/26="AF33SAS.jpg"
/27="AF35SAS.jpg"
/28="AM05SAS.jpg"
/29="AM32SAS.jpg"
/30="AM35SAS.jpg"
/31="AF02SAS.jpg"
/32="AF33SAS.jpg"
/33="AF35SAS.jpg"
/34="AM05SAS.jpg"
/35="AM32SAS.jpg"
/36="AM35SAS.jpg"
/37="AF02SAS.jpg"
/38="AF33SAS.jpg"
/39="AF35SAS.jpg"
/40="AM05SAS.jpg"
/41="AM32SAS.jpg"
/42="AM35SAS.jpg"
/43="AF02SAS.jpg"
/44="AF33SAS.jpg"
/45="AF35SAS.jpg"
/46="AM05SAS.jpg"
/47="AM32SAS.jpg"
/48="AM35SAS.jpg"
/49="AF02ANS.jpg"
/50="AF33ANS.jpg"
/51="AF35ANS.jpg"
/52="AM05ANS.jpg"
/53="AM32ANS.jpg"
/54="AM35ANS.jpg"
/55="AF02ANS.jpg"
/56="AF33ANS.jpg"
/57="AF35ANS.jpg"
/58="AM05ANS.jpg"
/59="AM32ANS.jpg"
/60="AM35ANS.jpg"
/61="AF02ANS.jpg"
/62="AF33ANS.jpg"
/63="AF35ANS.jpg"
/64="AM05ANS.jpg"
/65="AM32ANS.jpg"
/66="AM35ANS.jpg"
/67="AF02ANS.jpg"
/68="AF33ANS.jpg"
/69="AF35ANS.jpg"
/70="AM05ANS.jpg"
/71="AM32ANS.jpg"
/72="AM35ANS.jpg"
/73="AF02SAS.jpg"
/74="AF33SAS.jpg"
/75="AF35SAS.jpg"
/76="AM05SAS.jpg"
/77="AM32SAS.jpg"
/78="AM35SAS.jpg"
/79="AF02SAS.jpg"
/80="AF33SAS.jpg"
/81="AF35SAS.jpg"
/82="AM05SAS.jpg"
/83="AM32SAS.jpg"
/84="AM35SAS.jpg"
/85="AF02SAS.jpg"
/86="AF33SAS.jpg"
/87="AF35SAS.jpg"
/88="AM05SAS.jpg"
/89="AM32SAS.jpg"
/90="AM35SAS.jpg"
/91="AF02SAS.jpg"
/92="AF33SAS.jpg"
/93="AF35SAS.jpg"
/94="AM05SAS.jpg"
/95="AM32SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEW>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"
/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"
/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"
/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"
/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"
/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"
/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"
/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEW>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1)
/ select = values.selectStim
</list>

<item correctButton_testEW>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="tristeButton"
/14="tristeButton"
/15="tristeButton"
/16="tristeButton"
/17="tristeButton"
/18="tristeButton"
/19="tristeButton"
/20="tristeButton"
/21="tristeButton"
/22="tristeButton"
/23="tristeButton"
/24="tristeButton"
/25="rabbiaButton"
/26="rabbiaButton"
/27="rabbiaButton"
/28="rabbiaButton"
/29="rabbiaButton"
/30="rabbiaButton"
/31="rabbiaButton"
/32="rabbiaButton"
/33="rabbiaButton"
/34="rabbiaButton"
/35="rabbiaButton"
/36="rabbiaButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"
/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="tristeButton"
/62="tristeButton"
/63="tristeButton"
/64="tristeButton"
/65="tristeButton"
/66="tristeButton"
/67="tristeButton"
/68="tristeButton"
/69="tristeButton"
/70="tristeButton"
/71="tristeButton"
/72="tristeButton"
/73="rabbiaButton"
/74="rabbiaButton"
/75="rabbiaButton"
/76="rabbiaButton"
/77="rabbiaButton"
/78="rabbiaButton"
/79="rabbiaButton"
/80="rabbiaButton"
/81="rabbiaButton"
/82="rabbiaButton"
/83="rabbiaButton"
/84="rabbiaButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF02ANS.jpg"
/2="AF33ANS.jpg"
/3="AF35ANS.jpg"
/4="AM05ANS.jpg"
/5="AM32ANS.jpg"
/6="AM35ANS.jpg"
/7="AF02ANS.jpg"
/8="AF33ANS.jpg"
/9="AF35ANS.jpg"
/10="AM05ANS.jpg"
/11="AM32ANS.jpg"
/12="AM35ANS.jpg"
/13="AF02ANS.jpg"
/14="AF33ANS.jpg"
/15="AF35ANS.jpg"
/16="AM05ANS.jpg"
/17="AM32ANS.jpg"
/18="AM35ANS.jpg"
/19="AF02ANS.jpg"
/20="AF33ANS.jpg"
/21="AF35ANS.jpg"
/22="AM05ANS.jpg"
/23="AM32ANS.jpg"
/24="AM35ANS.jpg"
/25="AF02SAS.jpg"
/26="AF33SAS.jpg"
/27="AF35SAS.jpg"
/28="AM05SAS.jpg"
/29="AM32SAS.jpg"
/30="AM35SAS.jpg"
/31="AF02SAS.jpg"
/32="AF33SAS.jpg"
/33="AF35SAS.jpg"
/34="AM05SAS.jpg"
/35="AM32SAS.jpg"
/36="AM35SAS.jpg"
/37="AF02SAS.jpg"
/38="AF33SAS.jpg"
/39="AF35SAS.jpg"
/40="AM05SAS.jpg"
/41="AM32SAS.jpg"
/42="AM35SAS.jpg"
/43="AF02SAS.jpg"
/44="AF33SAS.jpg"
/45="AF35SAS.jpg"
/46="AM05SAS.jpg"
/47="AM32SAS.jpg"
/48="AM35SAS.jpg"
/49="AF02ANS.jpg"
/50="AF33ANS.jpg"
/51="AF35ANS.jpg"
/52="AM05ANS.jpg"
/53="AM32ANS.jpg"
/54="AM35ANS.jpg"
/55="AF02ANS.jpg"
/56="AF33ANS.jpg"
/57="AF35ANS.jpg"
/58="AM05ANS.jpg"
/59="AM32ANS.jpg"
/60="AM35ANS.jpg"
/61="AF02ANS.jpg"
/62="AF33ANS.jpg"
/63="AF35ANS.jpg"
/64="AM05ANS.jpg"
/65="AM32ANS.jpg"
/66="AM35ANS.jpg"
/67="AF02ANS.jpg"
/68="AF33ANS.jpg"
/69="AF35ANS.jpg"
/70="AM05ANS.jpg"
/71="AM32ANS.jpg"
/72="AM35ANS.jpg"
/73="AF02SAS.jpg"
/74="AF33SAS.jpg"
/75="AF35SAS.jpg"
/76="AM05SAS.jpg"
/77="AM32SAS.jpg"
/78="AM35SAS.jpg"
/79="AF02SAS.jpg"
/80="AF33SAS.jpg"
/81="AF35SAS.jpg"
/82="AM05SAS.jpg"
/83="AM32SAS.jpg"
/84="AM35SAS.jpg"
/85="AF02SAS.jpg"
/86="AF33SAS.jpg"
/87="AF35SAS.jpg"
/88="AM05SAS.jpg"
/89="AM32SAS.jpg"
/90="AM35SAS.jpg"
/91="AF02SAS.jpg"
/92="AF33SAS.jpg"
/93="AF35SAS.jpg"
/94="AM05SAS.jpg"
/95="AM32SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"
/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"
/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"
/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"
/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"
/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"
/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"
/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"
/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"
/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"
/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = white
/ screencolor = (152, 133, 101)
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2WRuns,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_WORD,
expressions.ACC_WORDCongruent,
expressions.ACC_WORDIncongruent,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_WORD,
expressions.meanRT_WORDCongruent,
expressions.meanRT_WORDIncongruent,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2WRuns = 0
/practice2FRuns = 0
/selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_WORD:                     proportion correct in "WORD" block
/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_WORD:             mean correct latency (in ms) in "WORD" block
/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_WORD = list.accuracyEW.mean
/ACC_WORDCongruent = list.accuracyEWCongruent.mean
/ACC_WORDIncongruent = list.accuracyEWIncongruent.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_WORD = list.latenciesEW.mean
/meanRT_WORDCongruent = list.latenciesEWCongruent.mean
/meanRT_WORDIncongruent = list.latenciesEWIncongruent.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2W>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 6
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2W>
/ items = instructions
/ select = 14
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F1>
/ items = instructions
/ select = 7
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F2>
/ items = instructions
/ select = 8
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F3>
/ items = instructions
/ select = 9
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text newBlock1>
/ items = instructions
/ select = 10
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text newBlock2>
/ items = instructions
/ select = 11
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text break>
/ items = instructions
/ select = 12
/ position = (50%, 50%)
/ fontstyle = ("Arial", 6%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 13
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.newBlock1.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>



***********************
Instruction Trials
***********************

<trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

<trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2WStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2W, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2WEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2W, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F1, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock1>

/ stimulusframes = [1 = finishpractice2F2, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock1a>

/ stimulusframes = [1 = finishpractice2F3, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock2>

/ stimulusframes = [1 = newBlock1, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock2a>

/ stimulusframes = [1 = newBlock2, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial break>
/ skip = [
    values.countTestBlocks > 1;
]
/ ontrialbegin = [
    text.continueButton_Pnd.textbgcolor = blue;
]
/ stimulusframes = [1 = clearscreen, break, continueButton_Pnd]
/ validresponse = (" ")
/ recorddata = false
/ ontrialend = [
    text.continueButton_Pnd.textbgcolor = red;
]
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2W>
/ items = item.words_practice2W
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2W>
/items = pics_practice2W
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEW>
/ items = item.words_testEW
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEW>
/items = pics_testEW
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEW>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEWCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEWIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEW>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEWCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEWIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
    if (trial.practice1.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice1.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2W & 2F
**************************************************************************************************************
**************************************************************************************************************

<trial practice2W>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2W_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2W.nextvalue;
    values.correctButton = item.correctButton_practice2W.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, pic_practice2W, Word_practice2W, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2W.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2W.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2W.correct);
    values.ACC_practice2 = list.accuracy.mean;
    if (trial.practice2W.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice2W.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>



<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, pic_practice2W, Word_practice2W, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
    if (trial.practice2F.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice2F.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************

=> EW: Equal number congruent/incongruent pairs - WORD Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEW>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEW_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEW.nextvalue;
    values.correctButton = item.correctButton_testEW.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
/ stimulusframes = [1 = clearscreen, pic_testEW, Word_testEW, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEW.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEW.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEW.correct);
    list.accuracyEW.appendItem(trial.testEW.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEW.correct);
        list.accuracyEWCongruent.appenditem(trial.testEW.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEW.correct);
        list.accuracyEWIncongruent.appenditem(trial.testEW.correct);
    };
    if (trial.testEW.correct) {
        list.latencies.appendItem(trial.testEW.latency);
        list.latenciesEW.appendItem(trial.testEW.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEW.latency);
            list.latenciesEWCongruent.appendItem(trial.testEW.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEW.latency);
            list.latenciesEWIncongruent.appendItem(trial.testEW.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, pic_testEF, Word_testEF, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>


<trial repeatPractice2W>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2W, continueButton_intro]
/ validresponse = (" ")
</trial>


<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

<trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

<block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-7 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>


<block practice2WIntro>
/ trials = [1 = practice2WStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2W;
]
</block>

<block practice2W>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2WRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2W]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2W;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEW;
};
]
</block>

<block repeatPractice2W>
/ trials = [1=repeatPractice2W]
/ branch = [
return block.practice2W;
]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>


<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEW>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = nextBlock1;
    2 = nextBlock1a;
    3 = getReady1;
4-51 = testEW;
    52 = break;
    53 = finish;
]
</block>


<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = nextBlock2;
    2 = nextBlock2a;
    3 = getReady1;
4-51 = testEF;
    52 = break;
    53 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = intro;
2 = practice1Intro;
3 = practice1;
4-5 = noreplace(practice2WIntro, practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************

> I doubled up the trials in almost each block (from 6 to 12 in practice1; from 48 to 96 in testEW & EF blocks)

You didn't.



The practice1 block still runs only 6 trials, not 12.



The testEW block still runs only 48 trials, not 96. Same for the testEF block.



Igor Iarrobino
Igor Iarrobino
New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)
Group: Forum Members
Posts: 19, Visits: 50
Hello again,
hope you're doing good!
I have a new issue to solve about this EmoStroop script.
The structure of the script is unchanged, but I had to make some modifications on it: that is changing the emotions of interest and the response buttons, and increasing the number of stimuli/trials in each block, both practice and test blocks.
The latter aspect gives me the problem, and the problem is:
I doubled up the trials in almost each block (from 6 to 12 in practice1; from 48 to 96 in testEW & EF blocks), but the output keeps giving me the same number of trials and, furthermore, it seems it keeps letting out the same trials everytime (but not sure of this).

May you help me out solving this problem???

I have the same issue also in a EmoDynamic task, but I'm gonna try to figure out if I can solve this one by myself with your clues and hints about the Emo Stroop.

Thank you very much in advance!

<usermanual>
___________________________________________________________________________________________________________________    

                                    Emotional Stroop (keyboard version)
                                -'RABBIA' key on the LEFT, 'TRISTEZZA' key on the RIGHT
___________________________________________________________________________________________________________________

Script Author: IGOR IARROBINO, Research Fellow (igor.iarrobino@unimore.it/igor.iarrobino@gmail.com) for UNIMORE
Date: July 2024

Script Copyright © 05-18-2022 Millisecond Software

The script was originally designed for ABCD to be run on ipads and
was adapted by Millisecond to run with keyboards for the Millisecond Library in its former version.
This is an adaptation of ABCD Emotional Stroop to a custom version of the task.
___________________________________________________________________________________________________________________
TASK DESCRIPTION    
___________________________________________________________________________________________________________________    

Participants categorize words as "ANGER/RABBIA" feeling or a "SADNESS/TRISTEZZA" feeling.
The words are presented at the center of images. The image either show a word congruent face emotion
(e.g. "RABBIA" face paired with word expressing anger) or an incongruent one (e.g. "SADNESS" face paired with word expressing sadness).
Images depict disgust/disgusto and fear/paura emotions of Caucasian faces.
Participants work through 2 test blocks: one block presents an equal number of congruent and incongruent pairings. In one block, the participant have to respond to the emotional word.
In another block, the participant have to respond to the emotional face.
Block order is determined randomly.

In this script, the response button for 'anger/rabbia' is located on the left side and the response button for 'sadness/tristezza' is located
on the right side of the screen.

___________________________________________________________________________________________________________________    
DURATION
___________________________________________________________________________________________________________________    
the default set-up of the script takes appr. 15 minutes to complete

___________________________________________________________________________________________________________________    
DATA FILE INFORMATION
___________________________________________________________________________________________________________________
The default data stored in the data files are:

(1) Raw data file: 'emotionalstroop_ld_raw*.iqdat' (a separate file for each participant)*

build:                            The specific Inquisit version used (the 'build') that was run
computer.platform:                the platform the script was run on (win/mac/ios/android)
date, time:                     date and time script was run
subject, group:                 with the current subject/groupnumber
session:                        with the current session id

blockcode, blocknum:            the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum:             the name and number of the currently recorded trial (built-in Inquisit variable)
                                    Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
                                    that do not store data to the data file such as feedback trials. Thus, trialnum
                                    may not reflect the number of main trials run per block.
                                
keyAssignment:                    "leftanger => left response key is anger (rabbia); right response key is sadness (tristezza)                                
                                    
wordposition:                    center
word_y:                            stores the vertical coordinate of the current word (in % of canvas height)
congruence:                        1 = congruent; 2 = incongruent (emotion word and emotion image depict opposite emotions)
selectStim:                        itemnumber of selected stimulus

stimulusitem.1-:                the presented stimuli in order of trial presentation
stimulusitem.3                    1) an empty stimulus (clearscreen)
                                2) presented image
                                3) presented word
                                        
correctButton:                    stores the correct response button for the current trial

response:                        the participant's response (scancode of response key)
                                16 = Z = left ("anger/rabbia")
                                25 = M = right ("sadness/tristezza")

correct:                        accuracy of response: 1 = correct response; 0 = otherwise
latency:                         the response latency (in ms); measured from: onset of image/word pair
list.accuracy.mean:                proportion correct of current block        


(2) Summary data file: 'abcdemotionalstroop_ln_summary*.iqdat' (a separate file for each participant)*

inquisit.version:                Inquisit version run
computer.platform:                the platform the script was run on (win/mac/ios/android)
startdate:                        date script was run
starttime:                        time script was started
subjectid:                        assigned subject id number
groupid:                        assigned group id number
sessionid:                        assigned session id number
elapsedtime:                    time it took to run script (in ms); measured from onset to offset of script
completed:                        0 = script was not completed (prematurely aborted);
                                1 = script was completed (all conditions run)
                                
                                
keyAssignment:                    "leftanger" => left response key is anger (rabbia); right response key is sadness (tristezza)
                                
ACC_practice1:                    proportion correct in final practice1 run
practice1Runs:                    number of practice1 runs needed
ACC_practice2:                    proportion correct in final practice2 run
practice2Runs:                    number of practice2 runs needed

ACC_all:                        proportion correct overall (across all test trials)
ACC_equal:                        proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalCongruent:                proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_equalIncongruent:            proportion correct in "equal numbers of congruentincongruent pairings" block
ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

meanRT_all:                     mean correct latency (in ms) overall
meanRT_equal:                    mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalCongruent:            mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_equalIncongruent:        mean correct latency (in ms) in "equal numbers of congruentincongruent pairings" block
meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
meanRT_incongruent:                mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________    
EXPERIMENTAL SET-UP
___________________________________________________________________________________________________________________    

1. Practice Block Lexicon: 12 trials selected: all possible combinations
=> feedback provided
=> practice block is repeated if proportion correct of the last 8 trials is < 100%

2. 2 Practice Blocks Word and Face: 4 trials (rabbia-congruent, rabbia-incongruent, tristezza-congruent, tristezza-incongruent) each

1) Respond to Word
2) Respond to Face

For both:
=> feedback provided
=> practice block is repeated if proportion correct is < 100%


3. 2 Test Blocks: 48 trials * emotion = 96 total trials in each block

(1) Respond to Word - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)

(2) Respond to Face - Equal number of congruent and incongruent pairings for any emotion (*2)_ 50%:
-24 congruent word valence - pic valence pairings (fixed pairs)
-24 incongruent word valence - pic valence pairings (fixed pairs)
    
Trial Sequence:
Word/image (for: 3000ms) -> ITI: 1500ms (during practice: ITI provides feedback for 2000ms)

___________________________________________________________________________________________________________________    
EDITABLE CODE
___________________________________________________________________________________________________________________    
check below for (relatively) easily editable parameters, stimuli, instructions etc.
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code
to further customize your experiment.

The parameters you can change are:

Duration Parameters:
/wordPresentationTime_practice:                    word duration (in ms) during practice trials (default: 2500ms)
/feedbackDuration:                                feedback duration (in ms) during practice
/wordPresentationTime_test:                        word duration (in ms) during test trials (default: 2500ms)
/ITI:                                            intertrial interval (in ms) between test trials (default: 1500ms)
/readyDuration:                                    duration (in ms) of ready trial (default: 3000ms)

Interface:
/wordSize:                                        sizing of words proportional to canvas height (default: 5%)
/picsize:                                        sizing of images proportional to canvas height (default: 45%)
/top_y:                                            vertical coordinate of top word in relation to canvas (default: 40%)
/bottom_y:                                        vertical coordinate of bottom word in relation to canvas (default: 60%)
                                                    Note: top of canvas = 0%; bottom of canvas = 100%

/leftresponsekey:                                the left response key (default: "Z")
/rightresponsekey:                                the right response key (default: "M")

</usermanual>



**************************************************************************************************************
**************************************************************************************************************
    EDITABLE PARAMETERS: change editable parameters here
**************************************************************************************************************
**************************************************************************************************************
Word presented for max. 3000ms (response window same) -> Feedback (correct, incorrect, no response) for 1000ms; ITI: 1500ms

<parameters>
/wordPresentationTime_practice = 3000
/feedbackDuration = 1000
/wordPresentationTime_test = 3000
/ITI = 1500
/readyDuration = 2000

/wordSize = 5%
/picsize = 60%
/top_y = 55%
/bottom_y = 55%

/leftresponsekey = "Z"
/rightresponsekey = "M"
</parameters>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE INSTRUCTIONS: change instructions here
**************************************************************************************************************
**************************************************************************************************************
<instruct>
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</instruct>


<item instructions>
/1 = "

EMOTIONAL STROOP"

/2 = "PRATICA LESSICO

In questa breve pratica iniziale le verranno presentate, una alla volta, le PAROLE che utilizzeremo durante tutto l'esperimento. Esse esprimono degli stati emotivi di RABBIA o di TRISTEZZA.

Le PAROLE che le verranno presentate sono:
~n~n~n~n~n~n~n~n~n~n~n~n"

/3 = "Le verrà chiesto di premere '<%values.rabbiakey%>' se la parola presentata esprime uno stato emotivo di RABBIA.

Invece, le verrà chiesto di premere '<%values.tristezzakey%>' se la parola presentata esprime uno stato emotivo di TRISTEZZA.

Premi la BARRA quando è pronto ad iniziare la pratica."

/4 = "PRATICA PAROLA
Le compariranno delle parole emotive sovraimpresse su di un volto che, a sua volta, esprime un'emozione.
Le verrà chiesto di riconoscere se la PAROLA presentata esprime un'emozione di DISGUSTO, oppure se essa esprime un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere alla PAROLA, ignorando il volto che ne fa da sfondo.
Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/5 = "Grazie per aver svolto la prova.

Adesso svolgerà il test.

Prema la BARRA per continuare"

/6 = "PRATICA VOLTO
Le compariranno dei volti emotivi su cui sono sovraimpresse delle parole che, a loro volta, esprimono un'emozione.
Le verrà chiesto di riconoscere se il VOLTO presentato esprime un'emozione di RABBIA, oppure se esso esprime un'emozione di PAURA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere al VOLTO, ignorando la parola sovraimpressa.
Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'"

/7 = "Grazie per aver svolto la prova.

Prema la BARRA per andare al Test"

/8 = "TEST PAROLA.
Le compariranno delle parole emotive sovraimpresse su un volto che, a sua volta, esprime un'emozione.
Le verrà chiesto di riconoscere se le PAROLE presentate esprimino un'emozione di RABBIA, oppure se esse esprimino un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere alle PAROLE, ignorando i volti che ne fanno da sfondo."

/9 = "Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, ricordi di rispondere tenendo in cosiderazione soltanto le PAROLE!"

/10 = "TEST VOLTO
Le compariranno dei volti emotivi su cui sono sovraimpresse delle parole che, a loro volta, esprimono un'emozione.
Le verrà chiesto di riconoscere se i VOLTI presentati esprimino un'emozione di RABBIA, oppure se essi esprimino un'emozione di TRISTEZZA, premendo i tasti corrispondenti.
Il compito consiste nel rispondere ai VOLTI, ignorando le parole sovraimpresse ad essi."

/11 = "Ricordi:
Per il RABBIA prema '<%values.rabbiakey%>'
Per la TRISTEZZA prema '<%values.tristezzakey%>'

Inoltre, ricordi di rispondere tenendo in cosiderazione soltanto i VOLTI!"

/12 = "Lei è a metà strada!"

/13 = "Grazie per aver partecipato!"

/14 = "Grazie per aver svolto la prima prova."

</item>


<item continueButtons>
/1 = "Prema la BARRA per iniziare"
/2 = "Prema la BARRA per continuare"
/3 = "Prema la BARRA per iniziare"
/4 = "Prema la BARRA per iniziare"
/5 = "Prema la BARRA per iniziare"
/6 = "Prema la BARRA per iniziare"
/7 = "Prema la BARRA per continuare"
/8 = "Prema la BARRA per continuare"
/9 = "Prema la BARRA per iniziare"
/10 = "Prema la BARRA per continuare"
/11 = "Prema la BARRA per iniziare"
/12 = "Prema la BARRA per continuare"
/13 = "Stop"
/14 = "Prema la BARRA per continuare"
</item>

<text getReadyMessage>
/ items = ("Si tenga pronto! Il test sta per cominciare...

<%expressions.buttoninstruct3%>")
/ position = (50%, 50%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (80%, 80%)
</text>

<text rabbiaKeyReminder>
/ items = ("RABBIA = <%values.rabbiakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (25%, 90%)
/ erase = false
</text>

<text tristeKeyReminder>
/ items = ("TRISTEZZA = <%values.tristezzakey%>")
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ size = (30%, 5%)
/ vjustify = center
/ txcolor = white
/ position = (75%, 90%)
/ erase = false
</text>

<text rabbiaButton_instruct>
/ items = ("RABBIA = Prema '<%values.rabbiakey%>'")
/ position = (25%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text tristeButton_instruct>
/ items = ("TRISTEZZA = Prema '<%values.tristezzakey%>'")
/ position = (75%, 60%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 10%)
/ txcolor = white
</text>

<text rabbiaEmotionExamples>
/ items = ("arrabbiato~ninfuriato~nirritato~ninquieto~nnervoso~nfurioso")
/ position = (25%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>

<text tristezzaEmotionExamples>
/ items = ("rattristato~nsconfortato~ninfelice~nafflitto~navvilito~ntriste")
/ position = (75%, 70%)
/ fontstyle = ("Arial", 4%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (40%, 40%)
</text>


*******************************
General Helper Instructions
******************************

<text repeatPractice>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2W>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text repeatPractice2F>
/ items = ("Ci provi ancora!")
/ fontstyle = ("Arial", 4.00%, false, false, false, false, 5, 1)
/ size = (80%, 40%)
/ position = (50%, 30%)
</text>

<text exit>
/ items = ("<prema la BARRA per uscire>")
/ fontstyle = ("Arial", 3.5%, false, false, false, false, 5, 1)
/ position = (50%, 90%)
/ size = (80%, 5%)
/ vjustify = center
</text>

<expressions>
/buttoninstruct1 = if (computer.touch && !computer.haskeyboard) {"response button";}
else {
"un tasto";}
/buttoninstruct2 = if (computer.touch && !computer.haskeyboard) {"button";}
else {
"un altro tasto";}
/buttoninstruct3 = if (computer.touch && !computer.haskeyboard) {"Posizioni gli indici della mano sinistra e della mano destra rispettivamente sul tasto sinistro e sul tasto destro";}
else {
"Posizioni gli indici a sinistra su '<%parameters.leftresponsekey%>' e a destra su '<%parameters.rightresponsekey%>'";}
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    EDITABLE STIMULI
**************************************************************************************************************
**************************************************************************************************************

********************************************
practice 1
********************************************

<list practice1_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
/ replace = false
/ resetinterval = 0
</list>

<item words_practice1>
/1 = "arrabbiato"
/2 = "infuriato"
/3 = "irritato"
/4 = "inquieto"
/5 = "nervoso"
/6 = "furioso"
/7 = "rattristato"
/8 = "sconfortato"
/9 = "infelice"
/10 = "afflitto"
/11 = "avvilito"
/12 = "triste"
</item>

<item correctButton_practice1>
/1 = "rabbiaButton"
/2 = "rabbiaButton"
/3 = "rabbiaButton"
/4 = "rabbiaButton"
/5 = "rabbiaButton"
/6 = "rabbiaButton"
/7 = "tristeButton"
/8 = "tristeButton"
/9 = "tristeButton"
/10 = "tristeButton"
/11 = "tristeButton"
/12 = "tristeButton"
</item>

<item feedback>
/1 = "Corretto"
/2 = "Non corretto"
/3 = "Tempo scaduto"
</item>

********************************************
practice 2W (W = word response block)
********************************************

<list practice2W_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2W>
/1 = "AF02ANS.jpg"
/2 = "AF35SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM05SAS.jpg"
</item>

<item words_practice2W>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2W>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2W>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2W>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "tristeButton"
/4 = "rabbiaButton"
</item>

********************************************
practice 2F (F = face response block)
********************************************

<list practice2F_itemnumbers>
/ items = (1, 2, 3, 4)
/ replace = false
/ resetinterval = 0
</list>

<item pics_practice2F>
/1 = "AF02ANS.jpg"
/2 = "AF35SAS.jpg"
/3 = "AM35ANS.jpg"
/4 = "AM05SAS.jpg"
</item>

<item words_practice2F>
/1 = "infuriato"
/2 = "avvilito"
/3 = "sconfortato"
/4 = "inquieto"
</item>

<list wordPositions_practice2F>
/ items = (0, 0, 0, 0)
/ select = values.selectStim
</list>

<list congruency_practice2F>
/items = (1, 1, 2, 2)
/ select = values.selectStim
</list>

<item correctButton_practice2F>
/1 = "rabbiaButton"
/2 = "tristeButton"
/3 = "rabbiaButton"
/4 = "tristeButton"
</item>

****************************
TestEW
(E = equal number of congruent and incongruent pairings; W = word response block)
****************************

<list testEW_itemnumbers>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEW>
/1="AF02ANS.jpg"
/2="AF33ANS.jpg"
/3="AF35ANS.jpg"
/4="AM05ANS.jpg"
/5="AM32ANS.jpg"
/6="AM35ANS.jpg"
/7="AF02ANS.jpg"
/8="AF33ANS.jpg"
/9="AF35ANS.jpg"
/10="AM05ANS.jpg"
/11="AM32ANS.jpg"
/12="AM35ANS.jpg"
/13="AF02ANS.jpg"
/14="AF33ANS.jpg"
/15="AF35ANS.jpg"
/16="AM05ANS.jpg"
/17="AM32ANS.jpg"
/18="AM35ANS.jpg"
/19="AF02ANS.jpg"
/20="AF33ANS.jpg"
/21="AF35ANS.jpg"
/22="AM05ANS.jpg"
/23="AM32ANS.jpg"
/24="AM35ANS.jpg"
/25="AF02SAS.jpg"
/26="AF33SAS.jpg"
/27="AF35SAS.jpg"
/28="AM05SAS.jpg"
/29="AM32SAS.jpg"
/30="AM35SAS.jpg"
/31="AF02SAS.jpg"
/32="AF33SAS.jpg"
/33="AF35SAS.jpg"
/34="AM05SAS.jpg"
/35="AM32SAS.jpg"
/36="AM35SAS.jpg"
/37="AF02SAS.jpg"
/38="AF33SAS.jpg"
/39="AF35SAS.jpg"
/40="AM05SAS.jpg"
/41="AM32SAS.jpg"
/42="AM35SAS.jpg"
/43="AF02SAS.jpg"
/44="AF33SAS.jpg"
/45="AF35SAS.jpg"
/46="AM05SAS.jpg"
/47="AM32SAS.jpg"
/48="AM35SAS.jpg"
/49="AF02ANS.jpg"
/50="AF33ANS.jpg"
/51="AF35ANS.jpg"
/52="AM05ANS.jpg"
/53="AM32ANS.jpg"
/54="AM35ANS.jpg"
/55="AF02ANS.jpg"
/56="AF33ANS.jpg"
/57="AF35ANS.jpg"
/58="AM05ANS.jpg"
/59="AM32ANS.jpg"
/60="AM35ANS.jpg"
/61="AF02ANS.jpg"
/62="AF33ANS.jpg"
/63="AF35ANS.jpg"
/64="AM05ANS.jpg"
/65="AM32ANS.jpg"
/66="AM35ANS.jpg"
/67="AF02ANS.jpg"
/68="AF33ANS.jpg"
/69="AF35ANS.jpg"
/70="AM05ANS.jpg"
/71="AM32ANS.jpg"
/72="AM35ANS.jpg"
/73="AF02SAS.jpg"
/74="AF33SAS.jpg"
/75="AF35SAS.jpg"
/76="AM05SAS.jpg"
/77="AM32SAS.jpg"
/78="AM35SAS.jpg"
/79="AF02SAS.jpg"
/80="AF33SAS.jpg"
/81="AF35SAS.jpg"
/82="AM05SAS.jpg"
/83="AM32SAS.jpg"
/84="AM35SAS.jpg"
/85="AF02SAS.jpg"
/86="AF33SAS.jpg"
/87="AF35SAS.jpg"
/88="AM05SAS.jpg"
/89="AM32SAS.jpg"
/90="AM35SAS.jpg"
/91="AF02SAS.jpg"
/92="AF33SAS.jpg"
/93="AF35SAS.jpg"
/94="AM05SAS.jpg"
/95="AM32SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEW>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"
/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"
/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"
/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"
/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"
/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"
/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"
/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEW>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1)
/ select = values.selectStim
</list>

<item correctButton_testEW>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="tristeButton"
/14="tristeButton"
/15="tristeButton"
/16="tristeButton"
/17="tristeButton"
/18="tristeButton"
/19="tristeButton"
/20="tristeButton"
/21="tristeButton"
/22="tristeButton"
/23="tristeButton"
/24="tristeButton"
/25="rabbiaButton"
/26="rabbiaButton"
/27="rabbiaButton"
/28="rabbiaButton"
/29="rabbiaButton"
/30="rabbiaButton"
/31="rabbiaButton"
/32="rabbiaButton"
/33="rabbiaButton"
/34="rabbiaButton"
/35="rabbiaButton"
/36="rabbiaButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"
/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="tristeButton"
/62="tristeButton"
/63="tristeButton"
/64="tristeButton"
/65="tristeButton"
/66="tristeButton"
/67="tristeButton"
/68="tristeButton"
/69="tristeButton"
/70="tristeButton"
/71="tristeButton"
/72="tristeButton"
/73="rabbiaButton"
/74="rabbiaButton"
/75="rabbiaButton"
/76="rabbiaButton"
/77="rabbiaButton"
/78="rabbiaButton"
/79="rabbiaButton"
/80="rabbiaButton"
/81="rabbiaButton"
/82="rabbiaButton"
/83="rabbiaButton"
/84="rabbiaButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

****************************
TestEF
(E = equal number of congruent and incongruent pairings; F = face response block)
****************************

<list testEF_itemnumbers>
/items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 58, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96)
/ replace = false
/ resetinterval = 0
</list>

<item pics_testEF>
/1="AF02ANS.jpg"
/2="AF33ANS.jpg"
/3="AF35ANS.jpg"
/4="AM05ANS.jpg"
/5="AM32ANS.jpg"
/6="AM35ANS.jpg"
/7="AF02ANS.jpg"
/8="AF33ANS.jpg"
/9="AF35ANS.jpg"
/10="AM05ANS.jpg"
/11="AM32ANS.jpg"
/12="AM35ANS.jpg"
/13="AF02ANS.jpg"
/14="AF33ANS.jpg"
/15="AF35ANS.jpg"
/16="AM05ANS.jpg"
/17="AM32ANS.jpg"
/18="AM35ANS.jpg"
/19="AF02ANS.jpg"
/20="AF33ANS.jpg"
/21="AF35ANS.jpg"
/22="AM05ANS.jpg"
/23="AM32ANS.jpg"
/24="AM35ANS.jpg"
/25="AF02SAS.jpg"
/26="AF33SAS.jpg"
/27="AF35SAS.jpg"
/28="AM05SAS.jpg"
/29="AM32SAS.jpg"
/30="AM35SAS.jpg"
/31="AF02SAS.jpg"
/32="AF33SAS.jpg"
/33="AF35SAS.jpg"
/34="AM05SAS.jpg"
/35="AM32SAS.jpg"
/36="AM35SAS.jpg"
/37="AF02SAS.jpg"
/38="AF33SAS.jpg"
/39="AF35SAS.jpg"
/40="AM05SAS.jpg"
/41="AM32SAS.jpg"
/42="AM35SAS.jpg"
/43="AF02SAS.jpg"
/44="AF33SAS.jpg"
/45="AF35SAS.jpg"
/46="AM05SAS.jpg"
/47="AM32SAS.jpg"
/48="AM35SAS.jpg"
/49="AF02ANS.jpg"
/50="AF33ANS.jpg"
/51="AF35ANS.jpg"
/52="AM05ANS.jpg"
/53="AM32ANS.jpg"
/54="AM35ANS.jpg"
/55="AF02ANS.jpg"
/56="AF33ANS.jpg"
/57="AF35ANS.jpg"
/58="AM05ANS.jpg"
/59="AM32ANS.jpg"
/60="AM35ANS.jpg"
/61="AF02ANS.jpg"
/62="AF33ANS.jpg"
/63="AF35ANS.jpg"
/64="AM05ANS.jpg"
/65="AM32ANS.jpg"
/66="AM35ANS.jpg"
/67="AF02ANS.jpg"
/68="AF33ANS.jpg"
/69="AF35ANS.jpg"
/70="AM05ANS.jpg"
/71="AM32ANS.jpg"
/72="AM35ANS.jpg"
/73="AF02SAS.jpg"
/74="AF33SAS.jpg"
/75="AF35SAS.jpg"
/76="AM05SAS.jpg"
/77="AM32SAS.jpg"
/78="AM35SAS.jpg"
/79="AF02SAS.jpg"
/80="AF33SAS.jpg"
/81="AF35SAS.jpg"
/82="AM05SAS.jpg"
/83="AM32SAS.jpg"
/84="AM35SAS.jpg"
/85="AF02SAS.jpg"
/86="AF33SAS.jpg"
/87="AF35SAS.jpg"
/88="AM05SAS.jpg"
/89="AM32SAS.jpg"
/90="AM35SAS.jpg"
/91="AF02SAS.jpg"
/92="AF33SAS.jpg"
/93="AF35SAS.jpg"
/94="AM05SAS.jpg"
/95="AM32SAS.jpg"
/96="AM35SAS.jpg"
</item>

<item words_testEF>
/1="arrabbiato"
/2="infuriato"
/3="inquieto"
/4="irritato"
/5="furioso"
/6="nervoso"
/7="arrabbiato"
/8="infuriato"
/9="inquieto"
/10="irritato"
/11="furioso"
/12="nervoso"
/13="rattristato"
/14="sconfortato"
/15="infelice"
/16="afflitto"
/17="avvilito"
/18="triste"
/19="rattristato"
/20="sconfortato"
/21="infelice"
/22="afflitto"
/23="avvilito"
/24="triste"
/25="arrabbiato"
/26="infuriato"
/27="inquieto"
/28="irritato"
/29="furioso"
/30="nervoso"
/31="arrabbiato"
/32="infuriato"
/33="inquieto"
/34="irritato"
/35="furioso"
/36="nervoso"
/37="rattristato"
/38="sconfortato"
/39="infelice"
/40="afflitto"
/41="avvilito"
/42="triste"
/43="rattristato"
/44="sconfortato"
/45="infelice"
/46="afflitto"
/47="avvilito"
/48="triste"
/49="arrabbiato"
/50="infuriato"
/51="inquieto"
/52="irritato"
/53="furioso"
/54="nervoso"
/55="arrabbiato"
/56="infuriato"
/57="inquieto"
/58="irritato"
/59="furioso"
/60="nervoso"
/61="rattristato"
/62="sconfortato"
/63="infelice"
/64="afflitto"
/65="avvilito"
/66="triste"
/67="rattristato"
/68="sconfortato"
/69="infelice"
/70="afflitto"
/71="avvilito"
/72="triste"
/73="arrabbiato"
/74="infuriato"
/75="inquieto"
/76="irritato"
/77="furioso"
/78="nervoso"
/79="arrabbiato"
/80="infuriato"
/81="inquieto"
/82="irritato"
/83="furioso"
/84="nervoso"
/85="rattristato"
/86="sconfortato"
/87="infelice"
/88="afflitto"
/89="avvilito"
/90="triste"
/91="rattristato"
/92="sconfortato"
/93="infelice"
/94="afflitto"
/95="avvilito"
/96="triste"
</item>

<list congruency_testEF>
/ items = (1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1))
/ select = values.selectStim
</list>

<item correctButton_testEF>
/1="rabbiaButton"
/2="rabbiaButton"
/3="rabbiaButton"
/4="rabbiaButton"
/5="rabbiaButton"
/6="rabbiaButton"
/7="rabbiaButton"
/8="rabbiaButton"
/9="rabbiaButton"
/10="rabbiaButton"
/11="rabbiaButton"
/12="rabbiaButton"
/13="rabbiaButton"
/14="rabbiaButton"
/15="rabbiaButton"
/16="rabbiaButton"
/17="rabbiaButton"
/18="rabbiaButton"
/19="rabbiaButton"
/20="rabbiaButton"
/21="rabbiaButton"
/22="rabbiaButton"
/23="rabbiaButton"
/24="rabbiaButton"
/25="tristeButton"
/26="tristeButton"
/27="tristeButton"
/28="tristeButton"
/29="tristeButton"
/30="tristeButton"
/31="tristeButton"
/32="tristeButton"
/33="tristeButton"
/34="tristeButton"
/35="tristeButton"
/36="tristeButton"
/37="tristeButton"
/38="tristeButton"
/39="tristeButton"
/40="tristeButton"
/41="tristeButton"
/42="tristeButton"
/43="tristeButton"
/44="tristeButton"
/45="tristeButton"
/46="tristeButton"
/47="tristeButton"
/48="tristeButton"
/49="rabbiaButton"
/50="rabbiaButton"
/51="rabbiaButton"
/52="rabbiaButton"
/53="rabbiaButton"
/54="rabbiaButton"
/55="rabbiaButton"
/56="rabbiaButton"
/57="rabbiaButton"
/58="rabbiaButton"
/59="rabbiaButton"
/60="rabbiaButton"
/61="rabbiaButton"
/62="rabbiaButton"
/63="rabbiaButton"
/64="rabbiaButton"
/65="rabbiaButton"
/66="rabbiaButton"
/67="rabbiaButton"
/68="rabbiaButton"
/69="rabbiaButton"
/70="rabbiaButton"
/71="rabbiaButton"
/72="rabbiaButton"
/73="tristeButton"
/74="tristeButton"
/75="tristeButton"
/76="tristeButton"
/77="tristeButton"
/78="tristeButton"
/79="tristeButton"
/80="tristeButton"
/81="tristeButton"
/82="tristeButton"
/83="tristeButton"
/84="tristeButton"
/85="tristeButton"
/86="tristeButton"
/87="tristeButton"
/88="tristeButton"
/89="tristeButton"
/90="tristeButton"
/91="tristeButton"
/92="tristeButton"
/93="tristeButton"
/94="tristeButton"
/95="tristeButton"
/96="tristeButton"
</item>

**************************************************************************************************************
**************************************************************************************************************
    DEFAULTS
**************************************************************************************************************
**************************************************************************************************************
script requires Inquisit 6.5.2.0 or higher

<defaults>
/canvasaspectratio = (4,3)
/minimumversion = "6.5.2.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/txbgcolor = transparent
/ txcolor = white
/ screencolor = (152, 133, 101)
/ inputdevice = keyboard
</defaults>

**************************************************************************************************************
**************************************************************************************************************
    DATA
**************************************************************************************************************
**************************************************************************************************************

Note: data file explanations under User Manual Information at the top

To change from one data file per participant to one data file for all participants, set
/separatefiles = false

***********************
raw data file
***********************
<data>
/ separatefiles = true
/ columns = (build, computer.platform, date, time, subject, group, session,
blockcode, blocknum, trialcode, trialnum,values.keyAssignment,
values.wordposition, values.word_y, values.congruence, values.selectStim,
stimulusitem, stimulusitem, stimulusitem,
values.correctButton, response, correct, latency, list.accuracy.mean)
</data>

***********************
summary data file
***********************
<summarydata>
/ columns = (inquisit.version, computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid,
script.elapsedtime, script.completed,
values.keyAssignment,
values.ACC_practice1,
values.practice1Runs,
values.ACC_practice2,
values.practice2WRuns,
values.practice2FRuns,

expressions.ACC_all,
expressions.ACC_WORD,
expressions.ACC_WORDCongruent,
expressions.ACC_WORDIncongruent,
expressions.ACC_FACE,
expressions.ACC_FACECongruent,
expressions.ACC_FACEIncongruent,
expressions.ACC_congruent,
expressions.ACC_incongruent,
expressions.meanRT_all,
expressions.meanRT_WORD,
expressions.meanRT_WORDCongruent,
expressions.meanRT_WORDIncongruent,
expressions.meanRT_FACE,
expressions.meanRT_FACECongruent,
expressions.meanRT_FACEIncongruent,
expressions.meanRT_congruent,
expressions.meanRT_incongruent)
/ separatefiles = true
</summarydata>


**************************************************************************************************************
**************************************************************************************************************
    VALUES: automatically updated
**************************************************************************************************************
**************************************************************************************************************

/countTestBlocks:        counts number of test blocks
/selectWord:            stores the itemnumber of the currently presented word
/selectImage:            stores the itemnumber of the currently presented image
/wordposition:            0 = words at the centre of the image
/word_y:                stores the vertical coordinate of the current word
/congruence:            0 = neutral; 1 = incongruent
/practice1Runs:            counts number of practice1 runs
/practice2WRuns:        counts number of practice2W runs
/practice2FRuns:        counts number of practice2F runs
/selectFeedback:        controls the selection of the feedback text to be presented
/skipReadyTrial:        0 = run ready trial; 1 = skip ready trial

<values>
/countTestBlocks = 0
/selectWord = 1
/selectImage = 1
/selectStim = 1
/wordposition = 0
/correctButton = ""
/word_y = 50%
/congruence = 0
/practice1Runs = 0
/practice2WRuns = 0
/practice2FRuns = 0
/selectFeedback = 0
/skipReadyTrial = 0
/getReady = 1
/keyAssignment = "leftanger"

/rabbiakey = parameters.leftresponsekey
/tristezzakey = parameters.rightresponsekey
</values>

/ACC_practice1:            stores the proportion correct of the current practice run

<values>
/ACC_practice1 = 0
/ACC_practice2 = 0
</values>

**************************************************************************************************************
**************************************************************************************************************
    EXPRESSIONS
**************************************************************************************************************
**************************************************************************************************************
/shadowSize:                        size of shadow text

/ACC_all:                        proportion correct overall (across all test trials)
/meanRT_all:                     mean correct latency (in ms) overall

/ACC_WORD:                     proportion correct in "WORD" block
/ACC_FACE:                     proportion correct in "FACE" block
/ACC_congruent:                    proportion correct in "congruent" pairings trials (across test blocks)
/ACC_incongruent:                proportion correct in "incongruent" pairings trials (across test blocks)

/meanRT_WORD:             mean correct latency (in ms) in "WORD" block
/meanRT_FACE:                    mean correct latency (in ms) in "FACE" block
/meanRT_congruent:                mean correct latency (in ms) in "congruent" pairings trials (across test blocks)
/meanRT_incongruent:            mean correct latency (in ms) in "incongruent" pairings trials (across test blocks)

<expressions>
/shadowSize = parameters.wordSize * 1.01

/ACC_all = list.accuracy.mean
/ACC_WORD = list.accuracyEW.mean
/ACC_WORDCongruent = list.accuracyEWCongruent.mean
/ACC_WORDIncongruent = list.accuracyEWIncongruent.mean
/ACC_FACE = list.accuracyEF.mean
/ACC_FACECongruent = list.accuracyEFCongruent.mean
/ACC_FACEIncongruent = list.accuracyEFIncongruent.mean
/ACC_congruent = list.accuracyCongruent.mean
/ACC_incongruent = list.accuracyIncongruent.mean

/meanRT_all = list.latencies.mean
/meanRT_WORD = list.latenciesEW.mean
/meanRT_WORDCongruent = list.latenciesEWCongruent.mean
/meanRT_WORDIncongruent = list.latenciesEWIncongruent.mean
/meanRT_FACE = list.latenciesEF.mean
/meanRT_FACECongruent = list.latenciesEFCongruent.mean
/meanRT_FACEIncongruent = list.latenciesEFIncongruent.mean
/meanRT_congruent = list.latenciesCongruent.mean
/meanRT_incongruent = list.latenciesIncongruent.mean
</expressions>

**************************************************************************************************************
**************************************************************************************************************
    INSTRUCTIONS
**************************************************************************************************************
**************************************************************************************************************

<text intro>
/ items = instructions
/ select = sequence
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2W>
/ items = instructions
/ select = 4
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text intropractice2F>
/ items = instructions
/ select = 6
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2W>
/ items = instructions
/ select = 14
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F1>
/ items = instructions
/ select = 7
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F2>
/ items = instructions
/ select = 8
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text finishpractice2F3>
/ items = instructions
/ select = 9
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text newBlock1>
/ items = instructions
/ select = 10
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text newBlock2>
/ items = instructions
/ select = 11
/ position = (50%, 50%)
/ fontstyle = ("Arial", 4%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text break>
/ items = instructions
/ select = 12
/ position = (50%, 50%)
/ fontstyle = ("Arial", 6%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text end>
/ items = instructions
/ select = 13
/ position = (50%, 50%)
/ fontstyle = ("Arial", 8%, false, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (90%, 80%)
</text>

<text continueButton_intro>
/ items = continueButtons
/ select = text.intro.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_testblock>
/ items = continueButtons
/ select = text.newBlock1.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = blue
</text>

<text continueButton_Pnd>
/ items = continueButtons
/ select = text.end.currentitemnumber
/ position = (50%, 90%)
/ fontstyle = ("Arial", 3.5%, true, false, false, false, 5, 1)
/ vjustify = center
/ hjustify = center
/ size = (45%, 5%)
/ txbgcolor = red
</text>



***********************
Instruction Trials
***********************

<trial intro>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
/ branch = [
    trial.intro2;
]
</trial>

<trial intro2>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, RABBIAEmotionExamples, TRISTEZZAEmotionExamples, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1Start>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice1End>
/ inputdevice = keyboard
/ stimulusframes = [1 = intro, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2WStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2W, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2WEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2W, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FStart>
/ inputdevice = keyboard
/ stimulusframes = [1 = intropractice2F, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial practice2FEnd>
/ inputdevice = keyboard
/ stimulusframes = [1 = finishpractice2F1, continueButton_intro]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock1>

/ stimulusframes = [1 = finishpractice2F2, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock1a>

/ stimulusframes = [1 = finishpractice2F3, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock2>

/ stimulusframes = [1 = newBlock1, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial nextBlock2a>

/ stimulusframes = [1 = newBlock2, continueButton_testBlock]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial finish>
/ inputdevice = keyboard
/ skip = [
    values.countTestBlocks == 1;
]
/ stimulusframes = [1 = clearscreen, end, exit]
/ validresponse = (" ")
/ recorddata = false
</trial>

<trial break>
/ skip = [
    values.countTestBlocks > 1;
]
/ ontrialbegin = [
    text.continueButton_Pnd.textbgcolor = blue;
]
/ stimulusframes = [1 = clearscreen, break, continueButton_Pnd]
/ validresponse = (" ")
/ recorddata = false
/ ontrialend = [
    text.continueButton_Pnd.textbgcolor = red;
]
</trial>

*************************************
General Helper Instruction Trials/Blocks
*************************************

<trial getReady1>
/ stimulusframes = [1 = clearscreen, getReadyMessage, rabbiaKeyReminder, tristeKeyReminder]
// trialduration = 5000
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey) //
/ beginresponsetime = 0
/ errormessage = false
/ recorddata = false
</trial>

**************************************************************************************************************
**************************************************************************************************************
    STIMULI
**************************************************************************************************************
**************************************************************************************************************

<text Word_practice1>
/ items = item.words_practice1
/ select = values.selectStim
/ vposition = 50%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2W>
/ items = item.words_practice2W
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<text Word_practice2F>
/ items = item.words_practice2F
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_practice2W>
/items = pics_practice2W
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<picture pic_practice2F>
/items = pics_practice2F
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEW>
/ items = item.words_testEW
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEW>
/items = pics_testEW
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text Word_testEF>
/ items = item.words_testEF
/ select = values.selectStim
/ vposition = 55%
/ hposition = 50%
/ fontstyle = ("Arial", parameters.wordSize, false, false, false, false, 5, 1)
/ size = (40%, parameters.wordSize*1.5)
/ vjustify = center
/ hjustify = center
/ txcolor = white
/ erase = false
</text>

<picture pic_testEF>
/items = pics_testEF
/ select = values.selectStim
/ position = (50%, 50%)
/ size = (parameters.picsize, parameters.picSize)
/ erase = false
</picture>

<text feedback>
/ items = feedback
/ select = values.selectFeedback
/ txcolor = black
/ fontstyle = ("Arial", 7%, true, false, false, false, 5, 1)
/ position = (50%, 30%)
/ size = (80%, 10%)
/ vjustify = center
/ hjustify = center
/ erase = false
</text>

<shape getReadyEraser>
/ shape = rectangle
/ size = (80%, 40%)
/ position = (50%, 30%)
/ erase = false
/ color = black
</shape>

**************************************************************************************************************
**************************************************************************************************************
    LISTS    
**************************************************************************************************************
**************************************************************************************************************

*************************************************
Data Lists: used for descriptive statistics
store correct latencies/accuracy data
fill up during runtime
*************************************************

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracy>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latencies>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEW>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEWCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEWIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEW>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEWCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEWIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEF>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyEFIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEF>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesEFIncongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyCongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesCongruent>
</list>

Note: list stores 1 = correct response; 0 = incorrect response for each relevant trial
any response coded as an error is automatically coded as 0
<list accuracyIncongruent>
</list>

Note: list stores the latency of correct responses for each relevant trial
<list latenciesIncongruent>
</list>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice1
**************************************************************************************************************
**************************************************************************************************************

<trial practice1>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice1_itemnumbers.nextvalue;
    values.correctButton = item.correctButton_practice1.item(values.selectStim);
]
/ stimulusframes = [1 = clearscreen, Word_practice1, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice1.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice1.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice1.correct);
    values.ACC_practice1 = list.accuracy.mean;
    if (trial.practice1.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice1.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>


**************************************************************************************************************
**************************************************************************************************************
    TRIALS : practice2W & 2F
**************************************************************************************************************
**************************************************************************************************************

<trial practice2W>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2W_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2W.nextvalue;
    values.correctButton = item.correctButton_practice2W.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, pic_practice2W, Word_practice2W, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2W.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2W.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2W.correct);
    values.ACC_practice2 = list.accuracy.mean;
    if (trial.practice2W.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice2W.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>



<trial practice2F>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.practice2F_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_practice2F.nextvalue;
    values.correctButton = item.correctButton_practice2F.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
//***** else { wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precedent one)
    

//****** Wordshadow_practice2, ****** it was in stimulus frame brackets
/ stimulusframes = [1 = clearscreen, pic_practice2W, Word_practice2W, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.practice2F.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.practice2F.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.practice2F.correct);
    values.ACC_practice2 = list.accuracy.mean;
    if (trial.practice2F.correct) {
        values.selectFeedback = 1;
        text.feedback.textcolor = green;
    } else if (trial.practice2F.response != 0) {
        values.selectFeedback = 2;
        text.feedback.textcolor = red;
    } else {
        values.selectFeedback = 3;
        text.feedback.textcolor = blue;
    };
]
/ trialduration = parameters.wordPresentationTime_practice
/ branch = [
    return trial.feedback;
]
</trial>

**************************************************************************************************************
**************************************************************************************************************
    TRIALS: test
**************************************************************************************************************
**************************************************************************************************************

=> EW: Equal number congruent/incongruent pairs - WORD Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEW>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEW_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEW.nextvalue;
    values.correctButton = item.correctButton_testEW.item(values.selectStim);
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
    
/ stimulusframes = [1 = clearscreen, pic_testEW, Word_testEW, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEW.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEW.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEW.correct);
    list.accuracyEW.appendItem(trial.testEW.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEW.correct);
        list.accuracyEWCongruent.appenditem(trial.testEW.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEW.correct);
        list.accuracyEWIncongruent.appenditem(trial.testEW.correct);
    };
    if (trial.testEW.correct) {
        list.latencies.appendItem(trial.testEW.latency);
        list.latenciesEW.appendItem(trial.testEW.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEW.latency);
            list.latenciesEWCongruent.appendItem(trial.testEW.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEW.latency);
            list.latenciesEWIncongruent.appendItem(trial.testEW.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

=> EF: Equal number congruent/incongruent pairs - FACE Response
//***** else {wvalues.word_y = wparameters.bottom_y;}; ***** (to activate put ']' at the end, and erase the precEdent one)
//****** Wordshadow_testE, ***** it was in stimulusframes

<trial testEF>
/ inputdevice = keyboard
/ ontrialbegin = [
    values.selectStim = list.testEF_itemnumbers.nextvalue;
    values.wordposition = 0;
    values.congruence = list.congruency_testEF.nextvalue;
    values.correctButton = item.correctButton_testEF.item(values.selectStim);
    //values.wordposition == 0)
    if (values.wordposition == 0) {
        values.word_y = parameters.top_y;
    } else {
        values.word_y = parameters.bottom_y;
    };
]
        
/ stimulusframes = [1 = clearscreen, pic_testEF, Word_testEF, rabbiaKeyReminder, tristeKeyReminder]
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ iscorrectresponse = [
    if (values.correctButton == "rabbiaButton") {
        if (trial.testEF.responsetext == values.rabbiakey) {
            return true;
        } else {
            return false;
        };
    } else {
        if (trial.testEF.responsetext == values.tristezzakey) {
            return true;
        } else {
            return false;
        };
    };
]
/ beginresponsetime = 0
/ responseinterrupt = immediate
/ ontrialend = [
    list.accuracy.appendItem(trial.testEF.correct);
    list.accuracyEF.appendItem(trial.testEF.correct);
    if (values.congruence == 1) {
        list.accuracyCongruent.appendItem(trial.testEF.correct);
        list.accuracyEFCongruent.appenditem(trial.testEF.correct);
    } else {
        list.accuracyIncongruent.appendItem(trial.testEF.correct);
        list.accuracyEFIncongruent.appenditem(trial.testEF.correct);
    };
    if (trial.testEF.correct) {
        list.latencies.appendItem(trial.testEF.latency);
        list.latenciesEF.appendItem(trial.testEF.latency);
        if (values.congruence == 1) {
            list.latenciesCongruent.appendItem(trial.testEF.latency);
            list.latenciesEFCongruent.appenditem(trial.testEF.latency);
        } else {
            list.latenciesIncongruent.appendItem(trial.testEF.latency);
            list.latenciesEFIncongruent.appenditem(trial.testEF.latency);
        };
    };
]
/ trialduration = parameters.wordPresentationTime_test
/ branch = [
    return trial.ITI;
]
</trial>

<trial repeatPractice>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice, continueButton_intro]
/ validresponse = (" ")
</trial>


<trial repeatPractice2W>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2W, continueButton_intro]
/ validresponse = (" ")
</trial>


<trial repeatPractice2F>
/ inputdevice = keyboard
/ stimulusframes = [1 = repeatPractice2F, continueButton_intro]
/ validresponse = (" ")
</trial>
**************************************************************************************************************
**************************************************************************************************************
    TRIALS : helper trials
**************************************************************************************************************
**************************************************************************************************************

<trial feedback>
/ stimulusframes = [1 = clearscreen, feedback]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.feedbackDuration
</trial>

<trial ITI>
/ stimulusframes = [1 = clearscreen]

//touchscreens: present inactive response buttons
/ validresponse = (parameters.leftresponsekey, parameters.rightresponsekey)
/ isvalidresponse = [
    return(false);
]

/ recorddata = false
/ trialduration = parameters.ITI
</trial>

**************************************************************************************************************
**************************************************************************************************************
    BLOCKS
**************************************************************************************************************
**************************************************************************************************************

<block intro>
/ trials = [1 = intro]
</block>

<block practice1Intro>
/ trials = [1 = practice1Start]
</block>

<block practice1>
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.practice1Runs += 1;
]
/ trials = [1 = getReady1; 2-7 = practice1]
/ branch = [
    if (list.accuracy.mean < 1 && !monkey.monkeymode) {
        return block.repeatPractice;
    };
]
</block>

<block repeatPractice>
/ trials = [1=repeatPractice]
/ branch = [
    return block.practice1;
    ]
</block>


<block practice2WIntro>
/ trials = [1 = practice2WStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2W;
]
</block>

<block practice2W>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2WRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2W]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2W;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEW;
};
]
</block>

<block repeatPractice2W>
/ trials = [1=repeatPractice2W]
/ branch = [
return block.practice2W;
]
</block>

<block practice2FIntro>
/ trials = [1 = practice2FStart]
/ onblockbegin = [
values.skipReadyTrial = 0;
]
/ branch = [
return block.practice2F;
]
</block>

<block practice2F>
/ onblockbegin = [
list.accuracy.reset();
list.latencies.reset();
values.practice2FRuns += 1;
]
/ trials = [1 = getReady1; 2-5 = practice2F]
/ onblockend = [
values.skipReadyTrial = 1;
]
/ branch = [
if (list.accuracy.mean < 1 && !monkey.monkeymode) {
return block.repeatPractice2F;
} else {
list.accuracy.reset();
list.latencies.reset();
values.skipReadyTrial = 0;
return block.testEF;
};
]
</block>


<block repeatPractice2F>
/ trials = [1=repeatPractice2F]
/ branch = [
return block.practice2F;
]
</block>


<block testStart>
/ trials = [1 = practice2FEnd]
/ onblockbegin = [
    list.accuracy.reset();
    list.latencies.reset();
    values.skipReadyTrial = 0;
]
</block>

<block testEW>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = nextBlock1;
    2 = nextBlock1a;
    3 = getReady1;
4-51 = testEW;
    52 = break;
    53 = finish;
]
</block>


<block testEF>
/ onblockbegin = [
    values.countTestBlocks += 1;
]
/ trials = [
    1 = nextBlock2;
    2 = nextBlock2a;
    3 = getReady1;
4-51 = testEF;
    52 = break;
    53 = finish;
]
</block>


**************************************************************************************************************
**************************************************************************************************************
    EXPERIMENT
**************************************************************************************************************
**************************************************************************************************************
<expt>
/ onexptbegin = [
if (computer.touch && !computer.haskeyboard) {
text.continueButton_Pnd.skip = true;
text.continueButton_intro.skip = true;
text.continueButton_testblock.skip = true;
};]

/ blocks = [
1 = intro;
2 = practice1Intro;
3 = practice1;
4-5 = noreplace(practice2WIntro, practice2FIntro);
]
</expt>

<monkey>
/ latencydistribution = normal(50, 20)
</monkey>

**************************************************************************************************************
                                                End of File
**************************************************************************************************************



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search