Presenting Images


Author
Message
cutkiller
cutkiller
Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)
Group: Forum Members
Posts: 13, Visits: 23
I tried adding another survey

<surveypage genderpage>
/ ontrialend = [values.emostate = dropdown.emoquestion.response]
/ questions = [1=genderquestion]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<dropdown genderquestion>
/ caption = "Gender:"
/ options = ("Male", "Female")
</dropdown>

But when I run it, nothing appears. Any clue why?

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
cutkiller - Monday, May 15, 2017
I tried adding another survey

<surveypage genderpage>
/ ontrialend = [values.emostate = dropdown.emoquestion.response]
/ questions = [1=genderquestion]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<dropdown genderquestion>
/ caption = "Gender:"
/ options = ("Male", "Female")
</dropdown>

But when I run it, nothing appears. Any clue why?

A <surveypage> is a kind of <trial>. That trial needs to be run by a block (a <block> or <survey> element). That block needs to be run by the <expt>.

<picture mypicture>
/ items = pictureitems
/ select = sequence
/ size = (100%, 100%)
</picture>

<item pictureitems>
/ 1 = "image01.jpg"
/ 2 = "image02.jpg"
/ 3 = "image03.jpg"
/ 4 = "image04.jpg"
/ 5 = "image05.jpg"
/ 6 = "image06.jpg"
/ 7 = "image07.jpg"
/ 8 = "image08.jpg"
/ 9 = "image09.jpg"
/ 10 = "image10.jpg"
/ 11 = "image11.jpg"
/ 12 = "image12.jpg"
/ 13 = "image13.jpg"
/ 14 = "image14.jpg"
/ 15 = "image15.jpg"
/ 16 = "image16.jpg"
/ 17 = "image17.jpg"
/ 18 = "image18.jpg"
/ 19 = "image19.jpg"
/ 20 = "image20.jpg"
</item>

// press y or n
<trial showpicture>
/ ontrialend = [
    values.pictrialnumber += 1;
    values.picitem = picture.mypicture.currentitem;
    values.picdescription = "";
    values.picdescriptionlatency = "";
    values.showpiclatency = trial.showpicture.latency;
]
/ ontrialend = [if(trial.showpicture.correct) values.showpicresponse = "y" else values.showpicresponse = "n"]
/ stimulusframes = [1=mypicture]
/ validresponse = ("y", "n")
/ correctresponse = ("y")
/ recorddata = false
</trial>

// skip openended if answer in showpicture trial was wrong (= "n"; no, did not see anything)
<openended typeanswer>
/ skip = [trial.showpicture.error]
/ ontrialend = [
    values.picdescription = openended.typeanswer.response;
    values.picdescriptionlatency = openended.typeanswer.latency;
]
/ stimulusframes = [1=typeprompt]
/ size = (70%, 40%)
/ position = (50%, 70%)
/ multiline = true
/ charlimit = 10000
/ recorddata = false
</openended>

// record data for the two above elements in a single line
<trial picdata>
/ recorddata = true
/ trialduration = 0
/ validresponse = (0)
</trial>

<text typeprompt>
/ items = ("Please describe what you saw:")
/ position = (50%, 20%)
</text>

<block picblock>
/ trials = [1-20 = sequence(showpicture, typeanswer, picdata)]
</block>

<block emoblock>
/ trials = [1=emopage; 2=genderpage]
</block>

<surveypage emopage>
/ ontrialend = [values.emostate = dropdown.emoquestion.response]
/ questions = [1=emoquestion]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<dropdown emoquestion>
/ caption = "Your current emotional state:"
/ options = ("bad", "neutral", "good")
</dropdown>

<surveypage genderpage>
/ ontrialend = [values.gender = dropdown.genderquestion.response]
/ questions = [1=genderquestion]
/ showpagenumbers = false
/ showquestionnumbers = false
</surveypage>

<dropdown genderquestion>
/ caption = "Gender:"
/ options = ("Male", "Female")
</dropdown>

<expt>
/ preinstructions = (intro)
/ blocks = [1=emoblock; 2=picblock]
</expt>

<page intro>
^intro goes here.
</page>

<values>
/ pictrialnumber = 0
/ picitem = ""
/ showpicresponse = ""
/ showpiclatency = ""
/ picdescription = ""
/ picdescriptionlatency = ""
/ emostate = ""
/ gender = ""
</values>

<data>
/ columns = [date, time, subject, group, blocknum, blockcode, trialnum, trialcode, values.emostate, values.gender, values.pictrialnumber, values.showpiclatency, values.showpicresponse,
    values.picitem, values.picdescription, values.picdescriptionlatency]
</data>

Edited 7 Years Ago by Dave
cutkiller
cutkiller
Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)Expert (1.4K reputation)
Group: Forum Members
Posts: 13, Visits: 23
Makes sense. Thank you.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search