Howdy, Stranger!

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

Supported by

Quit after 5 mistakes + pause on tablet

I am running a simple picture-selection experiment on a windows tablet in which participants hear a sentence and have to choose one among four pictures.
I need some help on these issues:
1. I want the experiment to stop if the participant makes 5 consecutive mistakes. Is there an easy way to implement this?
2. since the experiment runs in tablet mode, I cannot pause the experiment by pressing ESC (and then q or spacebar). I couldn't find these instructions in the in-line script. How can I arrange these pause-settings for an experiment running on a tablet? (even a simple command like double-clicking at the center of the screen would be fine)



  • Hi Francesca,

    Welcome to the forum!

    • There is no direct way to do this but it can be implemented quite easily with the use of an 'inline_script' that would count the correct and incorrect trials and check whether five consectutive errors have been made. In that case, the experiment will abort or continue to the next section. It would look something like:

      var.errors = 0
      var.abort_exp = 0
      if trial incorrect:
              var.errors += 1
              if var.errors == 5:
                      var.abort_exp = 1
      if trial correct:
              var.errors = 0

    The first two statements would go at the top of your experiment while the second section would be added in a script after every trial. Lastly, you need to set a Run If statement in your sequence that checks whether the variable abort_exp remains false (e.g. 0). Let me know how familiar you are with OpenSesame and inline scripts so far; the code above will not work in it's present form but this is the general idea.

    • On my ASUS tablet pressing the Return button (which is a left-wards pointing arrow on my device) allows the user to pause or abort the experiment, similarly to the ESC resonse on regular devices. You could check whether your tablet does the same. Alternatively, you could add an additional touch_response item after an X amount of trials to ask the participant if a break is needed, but this depends completely on the specifics of your experiment.


  • Hello!

    Im trying to do the same thing but i really don't know anything about inline scripts. I tried doing the same code you showed but it says theres an error.

    I was wondering if you could help me with the inline script for this function.

    Its urgent.

    Thank you

  • Hi Camila,

    If you want help, you have to provide us with more information on the problem you are experiencing. Without error message it is impossible to say what is going wrong. Also, this code alone won't work. It needs to be embedded in the correct experimental structure. So information on that would also be appreciated.

    Im trying to do the same thing but i really don't know anything about inline scripts.

    Check out this:

    There are plenty resources to learn python coding. I can strongly recommend following some of them. This will make your life easier in many ways, potentially.

    Good luck,


    Buy Me A Coffee

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 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