Reply To: Stuck in one trial.

PennController for IBEX Forums Support Stuck in one trial. Reply To: Stuck in one trial.

#5806
Jeremy
Keymaster

Hi Grace,

Your script works as intended: it shows the two pictures side by side, waits for a keypress on F or J, then reaches the end of the first trial so it moves to the next one, namely the SendResults trial, and after that it moves to the next (and final trial) where it prints two Text elements and immediately reaches the end of the trial, thus moving to a final empty screen. Just add something like newButton().wait() after printing your second Text element to fool the script into waiting on that trial forever.

Re. your third image, I am not sure what’s happening, but people have identified a bug with the farm where, if you name a file with an uppercase extension (eg. flanker.PNG) the experiment won’t run (you get a blank screen). Also, there is no wait command for the Canvas element (see the list of commands here).

Here is a script that should print all the images as you intend, as long as you have correspondingly named files (case-sensitive) under Resources (I don’t insert a linebreak before single commands, but you can keep them there if you prefer):

newTrial(
    newText("the cat jumped over the moon in pajamas").print()
    ,
    newImage("one", "thecatinpajamas.png").size(200,200)
    ,
    newImage("two", "themooninpajamas.png").size(200.200)
    ,
    newCanvas("onetwo", 450,400)
        .settings.add( 0, 0 , getImage("two") )
        .settings.add(250, 0, getImage("one") )
        .print()
    ,
    newKey("FJ").wait()
    ,
    getCanvas("onetwo").remove()
    ,
    newImage("flanker.png")
        .size(200.200)
        .print()
    ,
    newButton("Next")
        .print()
        .wait()
)
    
SendResults()

newTrial(
    newText("Thank you for your participation!").print()
    ,
    newText("Click here to validate your participation").print()
    ,
    newButton().wait()
)

Jeremy