Howdy, Stranger!

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

Supported by

[open] Set duration in form

edited April 2013 in OpenSesame

Hello,

I would like to know if there is a possibillty to set duration using a form.
In this form I'm presenting an image with an open question. I would like to give my participants limited time to answer the question. I hope someone knows how to do this!

Comments

  • edited 2:07PM

    I'm afraid that forms do not currently support a timeout value. However, you may want to take a look at this discussion:

    PS. Please post a question only once!

  • edited 2:07PM

    Thank you for your reply.
    I've read that discussion and tried it, but than I can't present a picture simultaneously with a question anymore.
    Do you think it is possible using advanced_delay? I've tried this, but than the participants can't type anymore.

    PS. I will post my questions only once. I'm sorry for posting this one twice.

  • edited 2:07PM

    When you insert an advanced_delay, the experiment simply pauses for the duration of the delay. You won't be able to do anything in parallel, such as recording participant responses.

    In your case, you will need to implement your own custom text input item with an inline_script, which uses a timeout and displays text on top of a sketchpad (so that you can show a picture at the same time). This sounds more complicated then it is, though. The basic script is available here (see this post for more comments):

    A slight modification for your specific case (and recent versions of OpenSesame) gives this script:

    from openexp.canvas import canvas
    from openexp.keyboard import keyboard
    
    timeout = 10000 # Your timeout value
    
    my_canvas = canvas(self.experiment)
    my_keyboard = keyboard(self.experiment)
    resp = "" # Here we store the response
    
    start_time = self.time()
    while self.time() - start_time < timeout:
        # Get a keyboard response
        key, time = my_keyboard.get_key()
        # keyboard.to_chr() converts the keycode to a description,
        # like 'space' or 'return'. If return is pressed the loop
        # should be exited.
        if key == "return":
            break           
        # Handle backspace by removing the last character
        if key == "backspace":
            resp = resp[:-1]    
        elif key == "space":
            resp += " "
        else:
            # The built-in chr() converts the keycode to a character,
            # like ' ' and '/'.
            resp += my_keyboard.to_chr(key)
        # Copy the canvas from a sketchpad called 'my_sketchpad' and
        # overlay the response
        my_canvas.copy(self.experiment.items["my_sketchpad"].canvas)
        my_canvas.text(resp)
        my_canvas.show()    
    # Save the response
    self.experiment.set("response", resp)
    

    It's not ideal, but until a timeout functionality has been implemented for forms (issue), a little inline scripting is required.

    Cheers!
    Sebastiaan

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games