Jeremy

Forum Replies Created

Viewing 15 posts - 226 through 240 (of 1,522 total)
  • Author
    Posts
  • in reply to: rating scale under images #9797
    Jeremy
    Keymaster

    Hello Eleni,

    All the .jpg files whose names start with 0 in your project’s Resources folder lack a dot before the second digit, but your code does include a dot (eg. newImage("0.9.jpg") but the file’s actual name is 09.jpg) — your draft project simply doesn’t reference any of those images

    Either remove the dots between 0 and the second digit in your code, or rename the files in your project and the problem should go away

    Jeremy

    in reply to: Correct/Incorrect answers in .csv file #9794
    Jeremy
    Keymaster

    Hi,

    my experiment has filler sentences that won’t have any intended answer – for instance, some of them have an unusual word order which would make them ungrammatical. Is there a way to log these filler sentences as “null” or “none” using this method?

    You could replace .log("CORRECT", getVar("CORRECT")) with .log("CORRECT", row.TYPE=="filler" ? "NA" : getVar("CORRECT"))

    I’m addressing the question from the last post on the dedicated topic created here

    Jeremy

    in reply to: rating scale under images #9793
    Jeremy
    Keymaster

    Hello,

    You print an element below another one by calling print() on the latter after calling it on the former. You are actually already doing this to print your Image elements below your Text elements (although you then move the Image element inside a Canvas element that only contains it, which seems unnecessary):

    PennController("univ.exist",
        newText("Κάθε κομμώτρια χτένισε κάποια γυναίκα.")  //// Set #2 , 2.7
        .center()
        .print()
        ,
        newImage("2.7.jpg")   
       .settings.size( 300 , 200 )
       .print()
        ,
        newCanvas("side-by-side", 450-200)
        .add( 0, 0, getImage("2.7.jpg"))
        .center()
        .print()
        ,
        newKey (" ")
        .wait()
        )

    So all you need to do is print a Scale element after the Image element, like this:

    newTrial("univ.exist",
        newText("Κάθε κομμώτρια χτένισε κάποια γυναίκα.")
          .center()
          .print()
        ,
        newImage("2.7.jpg")   
          .size( 300 , 200 )
          .center()
          .print()
        ,
        newScale("answer", 5)
          .log()
          .css({"max-width":280,width:280,color:"blue"})
          .button()
          .before( newText("(Διαφωνώ) ").italic() )
          .after( newText(" (Συμφωνώ)").italic() )
          .center()
          .print()
          .wait()
    )

    Jeremy

    in reply to: Experiment sequence halted/stuck #9791
    Jeremy
    Keymaster

    Hi,

    See my answer in this post

    Jeremy

    in reply to: Spacing "scale" radio buttons apart #9790
    Jeremy
    Keymaster

    Hi,

    Your code currently embeds every line starting from Template("CompQuantAdultStudy2022.csv", inside the wait command of the “practice” Scale element, because its closing parenthesis only comes at the end of the code. You need to take three closing parentheses out of the block of six below the getScale("score") lines, and move them up to replace the comma currently below the closing parenthesis of the failure command of the “practice” Scale element. This way, you’ll be closing not only the wait command, but also the “practice” newTrial and Template commands before getting to the “experimental-trial” ones

    Jeremy

    in reply to: Some pictures and audios not loading #9789
    Jeremy
    Keymaster

    Hello,

    It’s possible that the farm was receiving many requests when the issue occurred, and failed to respond to some requests for individual resources. Consolidating your resources in a single zip file makes the experiment send a single request, which is more likely to complete that several individual requests. That solution requires an external hosting solution, either a webserver or, for example, an Amazon S3 bucket

    Jeremy

    in reply to: Putting 4s time pressure on experimental trials #9776
    Jeremy
    Keymaster

    Hi,

    Yes, the logic is exactly the same:

    newTrial(
        newTimer("timeout", 4000).start()
        ,
        newText("Please click on A, B or C").css("margin-bottom","1em").print()
        ,
        newScale("answer", "A", "B", "C")
            .css({"max-width":"unset",width:"10vw"})
            .button()
            .callback( getTimer("timeout").stop() )
            .print()
            .log()
        ,
        getTimer("timeout").wait()
        ,
        clear()
        ,
        getScale("answer").test.selected().failure(
            newText("Time out! Press SPACE to proceed").print()
            ,
            newKey(" ").wait()
        )
    )

    Jeremy

    in reply to: No pictures during experimentation #9774
    Jeremy
    Keymaster

    Hello,

    The zip file and the pictures it contains are being downloaded and preloaded normally in the projects you linked to, now that the zip file is publicly available at the URL you gave

    Jeremy

    in reply to: Correct/Incorrect answers in .csv file #9771
    Jeremy
    Keymaster

    Hi,

    You could add this before your Scale element: newVar("CORRECT").global().set(false)

    Then right after wait() on the Scale element: .test.selected(row.EXPECTEDANSWER).success( getVar("CORRECT").set(true) )

    and finally after the last “record trial data” log line: .log("CORRECT", getVar("CORRECT"))

    Jeremy

    in reply to: Controller evaluating BBCode #9768
    Jeremy
    Keymaster

    Hello,

    You would need to edit DashedSentence.js: replace all occurrences of .text with .html

    Jeremy

    in reply to: Template trouble #9767
    Jeremy
    Keymaster

    Hi Nico,

    No worries. I’m leaving the post here in case anyone facing a similar issue finds it useful

    Jeremy

    in reply to: No pictures during experimentation #9766
    Jeremy
    Keymaster

    Hello,

    The link points to a forbidden resource. Does the zip file have read permission for everyone?

    Jeremy

    in reply to: Spacing between radio-buttons #9765
    Jeremy
    Keymaster

    Hi Rok,

    You cannot simply insert row.r1 and row.r2 directly in a string and have them replaced with the values of the corresponding javascript expressions. You need to do:

    newScale("practice_response", 
      "<span style='white-space: nowrap;'>"+row.r1+"</span>",
      "<span style='white-space: nowrap;'>"+row.r2+"</span>")

    Jeremy

    in reply to: Spacing between radio-buttons #9760
    Jeremy
    Keymaster

    Hi Rok,

    You can keep the two sentences on a single line, but if they are too long, they will necessarily end up overflowing the page’s width at some point:

    newScale("practice_response",
        "<span style='white-space: nowrap;'>this is a first pretty darn long sentence if you want my opinion</span>", 
        "<span style='white-space: nowrap;'>this is a second rather wordy sentence too if we are being honest</span>")
        .radio()
        .log()
        .labelsPosition("right")
        .center()
        .print()
        .wait()

    Jeremy

    in reply to: No pictures during experimentation #9759
    Jeremy
    Keymaster

    Hello,

    There are no files at the links you reference:

    I tried visiting the same URLs without www. just in case, but with no success. Did you double-check the paths and the file names?

    Jeremy

Viewing 15 posts - 226 through 240 (of 1,522 total)