Howdy, Stranger!

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

Supported by

How to insert a slider into a questionnaire in OpenSesame 3.1

Hi Sebastiaan,

I am trying to create a questionnaire in OpenSesame with a slider plugin. I got one from a fellow student who used a slider in OpenSesame 2.6. However, the plugin can not be loaded into OpenSesame 3.1 and I cannot find another one that does work. Do you have ideas/tips on how to insert a working slider into my questionnaire? Thank you in advance.

Kind regards,

Minne

Comments

  • Hi Minne,

    You can browse the forum a little, I remember there were several questions about sliders:

    For example:

    Good luck,
    Eduard

  • Thanks Eduard,

    I tried to insert both suggested scripts into the run phase of an inline script item but I encountered some problems.
    1. The script suggested in 'Implementing a slider' allows the experiment to run but it does not show a slider. Only a mouse arrow that can move freely over the screen. Is this depending on the version of OpenSesame (3.91) or the way I adjust it (or haven't adjusted it yet, sorry I'm really a beginner with this).
    2. The script suggested in 'Vertical Slider rating scale?' does allow the program to run but then gives an error. I guess I have to change something in the script but I don't know how.

    Do you have some advice? Thanks

    Cheers, Minne

  • Hi Minne,

    Can you upload your experiment? I'll have a look and try to make a basic slider for you.

    Eduard

  • Hello,
    I have a few questions, I'm searching for a slider plugin but the ones I have found don't work. For example this one : https://github.com/esdalmaijer/OpenSesame_slider_plugin, and the other plugin that we can install in opensesame 3.1 don't work. I tried to copy some of the old scripts but majority of them don't work properly. I am not a programmer and I can't write a script on my own.
    Can you help me ?
    Thank you in advance.

    Florence

  • Hi Florence,

    Did you get started with anything? If so, it'd be nice if you could share it (then I don't have to start from scratch). Also, please specify what kind of slider you would like to have.

    Eduard

  • Hi Eduard,
    I would like to transform this likert scale into a horizontal slider with these numbers as landmark. Do you think it's possible ?

    Thank you in advance.
    Florence

  • Hi Florence,

    Yes that is certainly possible. Have a look at this part of the documentation and start building your form from scratch. Basically you need two textfields (title and questions), three images (I think implemented by buttons?) , 5 more text fields (for the numbers on top of that scale), the actual scale and eventually the ok button. Maybe you can also start from the this template: http://osdoc.cogsci.nl/3.1/manual/forms/widgets/rating_scale/ and add the other elements that are not yet included.

    Hopes this get you started. I am quite sure you can manage to get the form you want.

    Good luck (and let us know if you get stuck),

    Eduard

  • Thank's a lot, but it's exactly what I have already done. I'm just looking for a plugin or a script to change this likert scale into a slider more intuitive...
    Could you help me to change it ?

  • Oh shit, sorry. Completely missed the point there. There is currently no plugin that I am aware of. The older ones probably don't really work any more with Opensesame. Can you share your code? I'm not sure but from what I remember, sliders are more easily implemented on a canvas rather than forms.

  • edited February 1

    No problem Eduard. It's kind from you. I thank you in advance !!!

    # widget 0 3 12 1 rating_scale nodes="-10;-9;-8;-7;-6;-5;-4;-3;-2;-1;0;1;2;3;4;5;6;7;8;9;10" var=rating_scale_responsevalence
    set timeout infinite
    set spacing 10
    set rows "1;1;1;2;1"
    set only_render no
    set margins "50;50;50;50"
    set description "A generic form plug-in"
    set cols "1;1;1;1;1;1;1;1;1;1;1;1"
    set _theme gray
    widget 0 0 12 1 label text="Question 1"
    widget 0 1 12 1 label text="Qu'avez vous ressenti comme émotion en regardant le film ?"
    widget 0 2 2 1 image path="smileneg.png"
    widget 10 2 2 1 image path="smilepos.png"
    widget 5 2 2 1 image path="smileneutral.png"
    widget 0 3 12 1 rating_scale nodes="-10; ; ; ; ;-5; ; ; ; ;0; ; ; ; ;5; ; ; ; ;10" var=rating_scale_responsevalence
    widget 5 4 2 1 button text=OK
    

    Florence

  • Hi Florence,

    This thread is a bit old (though I just got it going again a bit), but it might help with implementing a slider on a canvas. We've been having some trouble with the slider being laggy, and haven't figured that out yet, but you can find code here: forum.cogsci.nl/index.php?p=/discussion/40/solved-implementing-a-slider#latest
    for what it's worth, and do let us know how it turns out!

  • Hi Florence,

    As Matt already suggested, there is an inline_script implementation of the slider. I improved the script. Is that slider good enough for you?

    You can check out the code here: http://forum.cogsci.nl/index.php?p=/discussion/40/solved-implementing-a-slider#latest

    I'm not sure though, what the best way is to combine this inline_script with your form. Probably, you will have to translate your form syntax into inline-script syntax (see here how to). And then execute your form in a while loop with drawing bars or something like that to indicate the slider fill.

    Do you think you can manage?

    Eduard

  • Hi all,
    I have implemented a slider in my questionairre.

    I was wondering if it possible to fix the starting position of the cursor in the center of the slider.
    Like in the following example![(http://forum.cogsci.nl/uploads/editor/an/d25j8hm6w2aa.png "")

    Many thanks!
    Fra

  • Hi Eris,

    That should be possible, I would need to see your code to give you specific advice, but basically set the starting value of the canvas object that marks the current position to be the center of the scale.

    Eduard

Sign In or Register to comment.