Howdy, Stranger!

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

Supported by

[solved] I would like a pause button

edited September 2014 in OpenSesame

Hello everyone !
I'm beginner with opensesame.
I'm currently running and experiment using EEG. I would like to setup a button or something, which would allow me to make a pause at any moment.

Sometimes, an electrodes detach itself and I would like to be able to pause my OpenSesame script to repair the electrode.

Any idea ?

I searched in the documentation but I didn't find anything about a pause.

Johan.

Comments

  • edited 3:24PM

    Hi Johan,

    OpenSesame doesn't have a pause button, but you could implement one quite easily. The most convenient way to do this depends on your experiment, but the following is one option.

    1. Disable 'Flush pending key presses (...)' in your trial_sequence.
    2. Add a new keyboard_response to the start of your trial_sequence. Disable 'Flush pending keypresses', set the timeout to 0, and set the allowed responses to p.
    3. Add a new sketchpad just after the keyboard_response. Add a text message like, 'The experiment is paused'. Set the run if statement for this sketchpad to [response] = p.

    Do you see the logic here? Basically, if you press 'p' somewhere just before a new trial starts, this will cause the pause sketchpad to be shown.

    Hopefully this will get you started!

    Cheers,
    Sebastiaan

  • edited 3:24PM

    Okay Sebastiaan,
    I think I see how it could work. I will test it when I have some time and come back here to make a feedback.

    Cheers,
    Johan

  • edited September 2014

    Hello,
    So I tried a lot of thing running with this idea but i must be doing something wrong. i never had the good result.

    Most of the time, either I obtain a black screen (at the beginning of my sequence, when I put the two element here) and the experiment continues only if I press p, or I have a problem with the variable name. [response] does not exist in the sketchpad element...

    I tried with the two item at the beginning at the sequence, at the end, nothing changes.Perhaps you will have other idea or correction.

    image

    or

    image

  • edited 3:24PM

    Hi Johan,

    I cannot really tell from your example what goes wrong, but the instructions in my previous post should work. Except for this, which I hadn't considered:

    I have a problem with the variable name. [response] does not exist in the sketchpad element...

    I forgot that the variable response does not exist at the beginning of the experiment, so the run-if statement [response] = p will cause an error. To fix this, you can simply add the following line to the top of your experiment's general script:

    set response None
    

    This will give response an initial value.

    To get you started, here's a working example of a pause button:

    Good luck!

    Sebastiaan

  • edited 3:24PM

    Yeah,
    I just tried your advice and it's working. The problem was due to the value of the [response] variable.

    Thanks !

  • edited 3:24PM

    Okay it worked 3 times and now it fails every time.
    I will work on it and come back if nothing work.

    Bye,
    Johan

  • edited 3:24PM

    Hello,
    I really think the idea is good but it fail to work with my script.

    Johan

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