Jeremy

Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 1,522 total)
  • Author
    Posts
  • in reply to: Editing red "recording…" message #6368
    Jeremy
    Keymaster

    Hi Anna,

    As you guessed, the “Recording…” message is there for transparency reasons. I recommend providing your participants with a very clear signal indicating when they are being recorded or not at all time. You can modify the aesthetics of the top message either by writing a rule to that effect in a global CSS file, or by executing some javascript code upon runtime. Here is an example that uses the latter solution to completely hide it (along with the “record” button that comes with printing the video feedback):

    newTrial(
        newButton("Go fullscreen").print().wait().remove()
        ,
        fullscreen()
        ,
        newMediaRecorder("video").print().log().record()
        ,
        newFunction(()=>$("div:contains(Recording...), .PennController-MediaRecorder-record").hide()).call()
        ,
        newTimer(60000).start().wait() // Record for 1min
        ,
        getMediaRecorder("video").stop()
        ,
        newButton("Next").print().wait()
    )

    Let me know if you have any questions,

    Jeremy

    in reply to: test.pressed result not showing #6365
    Jeremy
    Keymaster

    Hi,

    You don’t see the feedback text because your trial moves to the next one immediately after you print the text. How do you want the participant to move to the next trial? By pressing another key? By clicking a “Next” button? For example, if you want a timer, you could simply add newTimer(3000).start().wait() before the closing parenthesis of newTrial (just don’t forget to add a comma before it to separate it from the preceding block of commands)

    Jeremy

    in reply to: Special marks in words #6362
    Jeremy
    Keymaster

    Hi Lesley,

    At least one of those solutions should have worked. Maybe the changes somehow weren’t taken into account when you tried. Did you try taking your experiment with another browser and/or in incognito (private) mode?

    Jeremy

    in reply to: Help with recording audio? #6360
    Jeremy
    Keymaster

    Hello,

    Unfortunately I don’t think Box supports PHP at the moment. It may be possible to use another API to handle the upload request that’s sent by PennController, but I never got around to trying that out because I only have access to Box through a university account, and administrators won’t grant access to the API for security reasons. If you are also using Box via an institution, I encourage you to inquire about it before spending too much time and energy on this. I can see why you’d rather not add another third party in the loop for data collection, but I have to say that using Dreamhost would definitely be much easier

    Let me know which route you end up deciding to go, I would be happy to provide assistance either way

    Jeremy

    in reply to: Linking Experiments #6350
    Jeremy
    Keymaster

    Hello Ehsan,

    You just need to add a link to your other experiment on the last trial of your experiment, after you’ve sent the results. If you’re using PennController on the native Ibex Farm, you could have your last trial look something like this:

    newTrial( "last" ,
      SendResults()
      ,
      newText("<a href='http://spellout.net/ibexexps/UserName/NextExpName/experiment.html'>"+
              "Click here to proceed to the next experiment</a>").print()
      ,
      newButton().wait()
    )

    Using native-Ibex syntax, it would look something like this:

    ["last", 
      "__SendResults__", {},
      "Message", {html: "<a href='http://spellout.net/ibexexps/UserName/NextExpName/experiment.html'>"+
                        "Click here to proceed to the next experiment</a>"}
    ]

    You would do that for your three first experiments, using the link of the ‘next’ experiment each time (the last experiment, by definition, not being associated with a ‘next’ experiment). Let me know if you have questions

    Jeremy

    in reply to: The drag and drop element #6347
    Jeremy
    Keymaster

    Hello,

    What you describe sounds reasonable. In terms of recording the mouse position, I’d say all one needs to do is start tracking the mouse before the participant starts dragging the element, and stop after they dropped it. Once implemented, the drag-and-drop element would log the event times for drag-start and drag-end (=drop), and one could use those to focus on the range of mouse coordinates in the relevant time window.

    I’ll see about implementing such an element in the future release

    Jeremy

    in reply to: log the only final status of the radio button #6342
    Jeremy
    Keymaster

    Hi Peiyao,

    You’d probably be better off using a good old HTML checkbox input, which comes with the on/off switch behavior you’re looking to implement by default:

    question = (name,text) => [
        newText("Question-"+name, text)
        ,
        newHtml("know-"+name, "<input type='checkbox' id='know-"+name+"' name='know-"+name+"'>"+
                              "<label for='know-"+name+"'>I know this name</label>")
            .log()
            .before(getText("Question-"+name) )
            .size("auto")
            .print()
        ,
        newCanvas("empty canvas", 1, 10)
             .print()
    ]
    
    newTrial("names",
        ...Authornames.map((v,i) => question(i,v))
        ,
        newCanvas("empty canvas", 1, 30)
             .print()    
        , 
        newButton("done", "Done")
            .print()
            .settings.css("font-size", "24")
            .center()
            .wait()
    )

    Jeremy

    in reply to: video looping #6341
    Jeremy
    Keymaster

    Hi,

    You’re right, I should probably add the option to pass "loop" to the play command. In the meantime, here’s a script that’ll do what you want:

    newTrial(
        newVideo("turbine", "https://upload.wikimedia.org/wikipedia/commons/8/8f/Active_Lift_Turbine.ogv")
            .print()
        ,
        newVar("loop", true),
        newTimer("loop", 1)
            .callback( getVar("loop").test.is(true).success(
                getVideo("turbine").play().wait()
                ,
                getTimer("loop").start()
            ) )
            .start()
        ,
        newKey("Enter").wait()
        ,
        getVar("loop").set(false),
        getVideo("turbine").stop()
        ,
        newButton("Next").print().wait()
    )

    Let me know if you have questions

    Jeremy

    in reply to: Eyetracker Setup Issues #6338
    Jeremy
    Keymaster

    Hi,

    Yes, you need to upload that extra file, as described in the top note on this page

    Jeremy

    in reply to: Eyetracker Setup Issues #6336
    Jeremy
    Keymaster

    Hello,

    The EyeTracker element has so far been pointing to a JS script file directly hosted on webgazer’s servers, which is regularly updated, sometimes causing incompatibilities, and recently their ssl certificate was expired, preventing browsers from accessing the script.

    I have updated the code of PennElement_eyetracker.js so it now points to a script file hosted on PCIbex’s servers, which should take care of both issues.

    Could you please try updating the content of your PennElement_eyetracker.js file with the code a the link above and let me know if that solved your problem?

    Jeremy

    in reply to: reaction time results appear in different two columns #6333
    Jeremy
    Keymaster

    Hi,

    I’m not sure I understand your first question: I seem to understand that you had a CQcorrect column for you non-filler trials to indicate which answer was the correct one for each of those trials. I don’t know the details of your design, but you probably cannot use CQcorrect from the non-filler trials to retrieve what it should be for the filler trials. Since you didn’t do it before data completion, you’ll have to associate your filler trials with their own CQcorrect manually now, after data completion: I don’t know how you could determine CQcorrect for the filler trials a priori.

    Regarding the second point, there could be plenty of reasons why you end up with an empty data frame. This is definitely R-related, so I cannot give priority to this question. I encourage you to see if you can find additional assistance from colleagues who are familiar with R (no need to be familiar with PCIbex here, since it’s all about data-frame transformation). You can still post your R code here, but as I said I won’t have time to answer it immediately.

    Jeremy

    in reply to: Several questions about the TextInput element #6331
    Jeremy
    Keymaster

    Hello Matthias,

    As I mentioned in point 2, you can retrieve the value of an HTML field and store it in a Var element, which means you can use log to append the value at the end of the results lines. Here’s a full example:

    newTrial(
        newVar("Alter").global()
        ,
        newHtml("alter", "<input type='number' id='alter' name='alter' min='1' max='120'>").print()
        ,
        newButton("Next").print().wait( 
            getVar("Alter").set( v=>$("#alter").val() ).testNot.is('')
        )
    )
    .log("alter", getVar("Alter"))

    Re. point 4, what you describe seems similar to using .log('all') except that it would be less reliable (eg. the first printable keypress could correspond to an uncaptured diacritic character, or the participant could press a key outside the input field that would then be wrongly detected). Is there something that dissuades you from using the .log('all') solution?

    Jeremy

    in reply to: The drag and drop element #6328
    Jeremy
    Keymaster

    Hello,

    There is no drag and drop element at the moment, unfortunately. Would you mind describing what you expect from it, besides mouse-tracking (which can already be done using the MouseTracker element). Would you like to be able to designate elements as draggable, other elements as droppable, and record which elements were dragged where?

    Jeremy

    in reply to: fail to download results in Chrome #6325
    Jeremy
    Keymaster

    Hi,

    Yes, other people have complained about that. I have no idea what this is about, and am unable to replicate the problem, I’m sorry. Hopefully that won’t happen with the new farm to come

    Jeremy

    in reply to: Several questions about the TextInput element #6319
    Jeremy
    Keymaster

    Hello Matthias,

    1) As you noticed, the latest printed TextInput element is the one that gets focused by default. Just print the TextInput that you want to auto-focus last, e.g: getTextInput("inputAlter").print( 400, 0, getCanvas("Canvas") )

    2) There is no straightforward way to do that for TextInput elements in PennController. You’d have to inject some HTML and find a way to save its value, like this for example: newHtml("alter", "<input type='number' id='alter' name='alter' min='1' max='120'>").print( 400, 0, getCanvas("Canvas") ). Then of course you’ll need to adapt any test you had on TextInput so it now checks the value of the HTML input element (e.g. newFunction( ()=>$("#alter").val().match(/^\d+$/) ).testNot.is(null)) and if you need to set a Var element, this is what you’d do: newVar("Alter").global().set( v=>$("#alter").val() )

    3) See point above if you want to use native-HTML features

    4) You can use .log("all") but then the format of the lines in the results file is special. You get four lines for one TextInput element beside the “Final” one, with the relevant information reported in the Comments column for three of them. One line reports how many key presses there were, one line reports the successive Keys that were pressed, one line reports the timecodes of each of those key presses, and one line reports the content of the input box after each of those key presses. The values are separated by commas, coded as %2C to prevent artificially adding extra columns to the results file.

    Example:

    1604596974,MD5,PennController,0,0,Angaben,NULL,TextInput,inputGeboren,NTypingEvents,8,1604596936977,33,weiblich,rechtshändig,Travail,sadfsad,nein,saddsf,asdfdsa,All saved%2C see documentation
    1604596974,MD5,PennController,0,0,Angaben,NULL,TextInput,inputGeboren,TypingEvent,Keys,NULL,33,weiblich,rechtshändig,Travail,sadfsad,nein,saddsf,asdfdsa,Shift%2CT%2Cr%2Ca%2Cv%2Ca%2Ci%2Cl
    1604596974,MD5,PennController,0,0,Angaben,NULL,TextInput,inputGeboren,TypingEvent,Texts,NULL,33,weiblich,rechtshändig,Travail,sadfsad,nein,saddsf,asdfdsa,%2C%2CT%2CTr%2CTra%2CTrav%2CTrava%2CTravai
    1604596974,MD5,PennController,0,0,Angaben,NULL,TextInput,inputGeboren,TypingEvent,Times,NULL,33,weiblich,rechtshändig,Travail,sadfsad,nein,saddsf,asdfdsa,1604596929424%2C1604596930876%2C1604596931456%2C1604596931566%2C1604596931782%2C1604596931866%2C1604596932002%2C1604596932132

    It’s ugly, but it’s easy to parse in R, for example, by splitting the Comments column using %2C. In this example, you can see from the second line that my first key press was the Shift key, and my second key press was the key T. The last line tells me that I pressed T 1604596930876-1604596929424=1452ms after I pressed Shift

    Let me know if you have questions

    Jeremy

Viewing 15 posts - 1,036 through 1,050 (of 1,522 total)