Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Request for Assistance with Transitioning OpenSesame Experiment to JATOS

edited May 2024 in OpenSesame

Hi Everyone,

I plan to use OpenSesame for conducting a self-paced reading experiment. I have already used OpenSesame a few years ago to conduct the same experiment, and used an inline script for that purpose.

Now, I aim to collect data online using JATOS. However, I understand that JATOS does not support inline script items. Could you advise on how I might adapt or modify my experiment to be compatible with JATOS? 

Alternatively, if you know of any other tools or methods that could serve this purpose, I would appreciate your recommendations.

I've attached the inline script from my previous study for your reference:


PREPARE PHASE:

# Create a keyboard that only accepts a space
my_keyboard = keyboard(keylist=['space'])

# Create a list of canvas objects with one target each
target_canvas_list = []
for target in var.Stimuli.split():
	target_canvas = canvas()
	target_canvas.text(target)
	target_canvas_list.append(target_canvas)


RUN PHASE:

# Loop through the list of canvas objects, show them, collect a keypress, and
# set the response time as an experimental variable

for target_nr, target_canvas in enumerate(target_canvas_list):
	t0 = target_canvas.show()
	key, t1 = my_keyboard.get_key()
	var.set('response_time_%d' % target_nr, t1-t0)


Thank you very much for your help.

Comments

  • Hi @mila ,

    You can use Canvas objects in an inline_javascript item more or less as you can in a Python inline_script , so that part of your script can be easily converted:

    However, there is no JavaScript equivalent of a Keyboard object, so you need to use the GUI keyboard_response item instead.

    Together, this likely means that you'll have to implement a solution using a loop item with a sequence item inside with an inline_javascript that presents one Canvas followed by a keyboard_response .

    Hope this helps!

    — Sebastiaan

  • Thank you very much for your response.

    But I forget to mention that in this experiment I need to record two responses:

    1. Reaction time for each word within the stimulus.
    2. Acceptability judgment for each sentence on a 7-point scale.

    How can this be done if I will use a keyboard_response?

  • Hi @mila ,

    In general terms, you would need to create a sequence that presents a single word (with either an inline_javscript or sketchpad ) and collects a single key press (with a keyboard_response ). And this sequence would then be inside a loop so that you do this multiple times. Together, this structure would then roughly correspond to what is now a single for loop in your inline_script item.

    And after this loop you would then likely have a form_multiple_choice or inline_html item to collect the acceptability judgment.

    So that's a rough outline. Of course the details depend entirely on the specifics of your experiment!

    — Sebastiaan

  • Hi Sebastiaan,

    Thank you very much for your assistance.

Sign In or Register to comment.