Howdy, Stranger!

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

Supported by

How to prevent participants from pressing key during a specified time frame

Hi, I only started using OpenSesame today, so apologies if this is a very easy solution.

I am using an object recognition paradigm for my experiment, however for the exposure, participants self-initiate stimuli presentation through a self-paced key-press.

As part of my research question I am trying to measure a physiological time point of optimum encoding. Thus, it is key for the participant to choose to present then stimuli only when they are completely ready to view the next image, and not to rush. Therefore, I need to prevent participants from rhythmically pressing present stimuli immediately when the instructions appear. Emphasising the choice to display the stimuli only when they are completely ready to do so.

I would like to create a randomised time-period, between say, 100 - 1800ms, which prevents participants from viewing the stimuli if they make a keyboard response. My question is: How do I make a message appear if the participants choose to present the stimuli during this time-frame, and how would I randomise the time?

My loop sequence right now:

Sketchpad (Instructions to press Enter to display image). Duration: 0ms.

Keyboard response (Press Enter). Duration: keypress

Sketchpad (displays image when enter is pressed). Duration: 400ms

Fixation dot. Duration: 2000ms

How I want my loop sequence:

Sketchpad (Instructions to press Enter to display image). Duration: 0ms.

If participant presses key within randomised time space, message is displayed and the loop returns to the instruction on the first sketchpad

Keyboard response (Press Enter). Duration: keypress

Sketchpad (displays image when enter is pressed). Duration: 400ms

Fixation dot. Duration: randomised between 500- 2800ms

Thank you in advance

Comments

  • edited November 2019

    Hi Quebek,


    i only know how to implement this with inline_scripting. So here the example with an inline_script. Maybe it is also possible with drag and drop, i do not know.


    For example you could show a first instruction for some random time slot (see below). Then you could show the same instruction with an additional information that it is now possible to continue.


    from random import shuffle
    delay = range(100,1800)
    shuffle(delay)
    clock.sleep(delay[1])
    


    Alternatively, you could make a function that starts again in case the key was pressed. Here an example of my scripts. You may adapt it for your purpose. In my example participants shall go to a starting position, but not lift before a certain time has passed. If they do, it starts from the beginning again.

    def TRIALhalf1(): #1st part of a trial
       shuffle (delay)
       start = [995,995,995,995,delay[1]]
       leer.flush()
       if fam_hand[1] == 'L' :
          Inst_Probe_L2.show()
          var.HandSide='left'
          key, time=leer.get_key()
       elif fam_hand[1] == 'R' :
          Inst_Probe_R2.show()
          var.HandSide='right'
          key, time=leer.get_key()
       for i in range(5):#press SPACE and keep it pressed
          t0 = red[i].show() #fomula 1 timer goes on
          #if SPACE is lifted start again
          key_up, time_key_up = leer.get_key_release(timeout=start[i])
          if key_up != None:
             TRIALhalf1()
             break
    
  • Thank you, this helped me with both issues at hand!

    I know have a tiny, but pesky issue with the presentation of the stimuli. If you fancy checking it out I have a new post: https://forum.cogsci.nl/index.php?p=/discussion/5594/problem-when-trying-to-repeat-specific-trial-until-response-is-correct#latest ;D

    but again, thank you, it really helped me get started with OS!

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