Reply To: html layout/event times/selector vs. scale/ compatibility

PennController for IBEX Forums Support html layout/event times/selector vs. scale/ compatibility Reply To: html layout/event times/selector vs. scale/ compatibility



thank you for your help, I am back again, struggling a bit.
So I tried the canvas option to get a mouse click to advance but it didn’t work, also I think the canvas go in conflict with loading a pre-written HTML page like the one having the instructions.
So I went back to the solution of using only the keyboard.

a) First: I don’t get the logic for the graphic layout set-up (if I run it on a PC or apple the position of the images changes, the position changes also if for some reason I change the zoom settings on the chrome browser).
I would like that the images and the text keep the same position no matter where the script is run.
What is the difference in using .center(), in using “vw, vh”, and in setting a position (500, 500)?
I thought vw would adapt to the hardware opening the script, but it goes off by changing the zoom settings of the browser, plus it centers pictures, but it doesn’t work in the same way with text, which is actually centered in a more efficient way with .center.

b) Then regarding the logic of the script:
(a picture is loaded with the spacebar, then a sentence is loaded with the spacebar, then 3 images appear representing a scale and the participant has to select one picture using 3 possible keys of the keyboard – before it was the mouse click and it worked, but I don’t want to implement the advancing with the space bar and the selection with the mouse, I want to use only one device, at first I thought the mouse was easier and more comfortable for the user, but this system seems not designed to code the fingers of the mouse, so I changed my mind and decided to use only the keyboard instead)

Once the scale appeared I would like that a message appears on the bottom saying “press the space bar to advance” (before there was a button, but avoiding the use of the mouse, means avoiding the use of buttons, and it’s better because only the stuff relevant for the tested processing mechanism appears on the screen).
This message has to appear only if they press one of the 3 selected keys, only if they selected at least one. The experiment cannot move forward without the answer of the participant.

Since it is a sequence of canvas, the text has to stay on a canvas too otherwise it appears underneath I guess. If they press the space bar before having given a judgement a warning text “please provide a judgement” should appear.

I tried several options, but something is not working, either I get errors, or the sequence doesn’t appear the way I want it.

b.1) Could you check if I am doing something logically wrong with the Wait(test.selected().failure) commands?

b.2)Can I specify to verify whether the participant has pressed “a” “g” “l” in the wait command? (does it matter if I declare “a” or “A”? )

b.3) To load the pictures and the scale I first created a canvas, then called it with getcanvas. For this last selector which has to appear only if the previous selector has been completed should I create first a canvas, then tell the system to print only if the selector has been closed, or should I create a newcanvas and say “print it only if the previous selector has registered either “a” “g” “l”?

The run messes up if I test the possibility that a participant presses a random key… the warning doesn’t come out and that either I place “once()” or not, the final command to press the space bar to advance does not appear, so the experiment crash.

    newText("warning", "Please provide a judgment before you can continue")

    .add( getImage("inappropriate"), getImage("infelicitous"), getImage("appropriate"))
    .keys(             "A"         ,               "G"       ,               "L"     )
    newCanvas( "End_of_trial_page" , 1000 , 35 )
    .wait(getSelector("smileys").test.selected().failure(getText("warning").visible()) )
    .settings.css( "border" , "solid 1px black" )
    .settings.add( 300,0, newText("move_on_to_new_trial", "PRESS THE SPACEBAR TO LOAD A NEWTRIAL" ) )
    //.wait(getSelector("smileys").test.selected().failure(getText("warning").visible()) )
    newKey("endtrial_newtrial"," ")

Thanks, sorry for using so much of your time,