Hi all,
I'm trying to make a script to assign a different url as a finish page depending on which of 4 pictures the user clicks in a trial. Broadly, what do you assign for the finished page when first building the web script on the millisecond website? Both "Redirect to the default finished page" and "redirect to a url" don't seem to work for my purposes. More specifically, how do you use conditionals to assign a finishpage based on the response to a trial?
My script is here:
http://research.millisecond.com/hcn/linkboard.weband here is my code (I might be way off base with the ontrialend statement):
<expt MPref_reasons>
/subjects = (1 of 1)
/ groupassignment = random
/ blocks = [1 = download]
</expt>
<block download>
/ trials = [1 = noreplace(linkboard1)]
</block>
#################################################
##############Linkboard trials###################
#################################################
<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1 == catpicA)
{
defaults.finishpage = "
http://home.uchicago.edu/~swdanielson/k9NQD"}
else if (trial.linkboard1 == holdpicB)
{
defaults.finishpage = "
http://home.uchicago.edu/~swdanielson/2XGJ9"}
else if (trial.linkboard1 == memepicC)
{
defaults.finishpage = "
http://home.uchicago.edu/~swdanielson/E5Lne"}
else if (trial.linkboard1 == nightpicD)
{
defaults.finishpage = "
http://home.uchicago.edu/~swdanielson/K6FgQ"}
]
</trial>
#########################################
###############Pictures##################
#########################################
<picture catpicA>
/items = ("cat.png")
/position = (20%, 20%)
</picture>
<picture memepicC>
/items = ("meme.png")
/position = (20%, 80%)
</picture>
<picture nightpicD>
/items = ("night.png")
/position = (80%, 80%)
</picture>
<picture holdpicB>
/items = ("hold.png")
/position = (80%, 20%)
</picture>
#####################################
############Link Text################
#####################################
<text catlink>
/ items = ("You will find a link to download the 'Cats' song on the study's finish page")
</text>
<text memelink>
/ items = ("You will find a link to download the 'Meme' song on the study's finish page")
</text>
<text holdlink>
/ items = ("You will find a link to download the 'Hold' song on the study's finish page")
</text>
<text nightlink>
/ items = ("You will find a link to download the 'Night' song on the study's finish page")
</text>