Howdy, Stranger!

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

Supported by

coroutines in osweb


I am currently working on an antisaccade experiment.

I have a problem regarding implementing it on osweb

in every trial there is a cue then a mask and I want to collect responses from the time the stim appeared

in open sesame I use a coroutine but currently, it is not supported.

is there a way to solve this?

thank you



  • Hi Dror,

    You can achieve something similar with an inline_script (if a python implementation helps you, I can make an example, but for an javascript implementation you're on your own). Alternatively, you can use a structure like this:

    • fix
    • start_timer (javascript_inlinescript)
    • stim (duration 0 ms)
    • resp_1 (duration 400 ms)
    • mask (duration 0 ms)
    • resp_2 (duration infinite or timeout - 400ms, where timeout represents the total response duration)
    • stop_timer (javascript_inlinescript)

    If you want, you could set the run_if fields of mask and resp2 to [response] != None (meaning that participants have not responded during the first phase, so that they are skipped.

    Then, the variables resp_1.response or resp_2.response will carry the response key (so you need to check whether any of the two is not None, and then use the other one). To get the response time, I would take a sample of the time at the javascript_inline (run phase), and another one after the second response phase (also run phase). Then you can use the difference between them as response time.

    See here for more info on javascript_inline:

    Hope this helps,


    Buy Me A Coffee

  • Hi @drorgarbi,

    You are correct: co-routines are not supported in OSWeb. In your case, if the mask's duration is so short that you don't reasonably expect participants to respond during the presentation of the mask, I'd suggest inserting the keyboard object right after the mask and, if the RT must be measured from the stimulus' onset, use Javascript code to modify the vars.response_time once the response has been registered (to add to it the duration of the stimulus and mask).

    If you want participants to be able to respond while the stimulus or the mask are on screen, you'll have to use two keyboard objects and a feedback object to display what ever needs to be on screen once a response has been registered (and set the duration of that feedback object to the mask's duration minus the response time of the response collected). It's a little cumbersome and you'll have to do some programming and tweaking. I gave a description of the overall method in an earlier post: You should be able to adapt it to your needs.

    This method is actually similar to that @eduard was suggesting.

    Good luck!


    PS: If you have the option of modifying your design to avoid having to present several keyboard objects and sketchpads/feedback items, better, as I recently observed that OSWeb 1.4 is subject to memory leaks ( If you're using a large number of trials, this could possibly cause the task to be unstable or the timing of events to become unreliable.

    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