Howdy, Stranger!

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

Supported by

Keyboard responses during video

Hello everyone!
I am extemely new to opensesame and still learning Python so any help would be really appreciated. I am using the media_player_mpy plugin to play my video stimuli. The issue is that when a key is pressed during the video, the experiment moves on to the next item in the sequence (the sequence is video-sketchpad-video, so the video moves on to the sketchpad). This is happening even when the duration is set i.e. when the duration is not 'keypress'. What can i do?

Comments

  • edited March 2017

    How many keypresses do you expect during your video?

    You may need an inline script with a "while" loop.
    Just look in the forum for examples. You may search for "while = True"

    Cheers
    Stephan

  • Actually I don't require any keypresses... I am looking for the experiment to ignore any accidental keypress during the video.

  • Hi @pranitharajn,

    Thanks for reporting this! That's actually a bug if it doesn't honor the time delay that is set. For now you can block this behavior by simply entering something in the script window. Something like

    if True:
            pass
    

    or even simply:

    i = 0
    

    should do the trick. Can you say if this works for you?

    Buy Me A Coffee

  • Hello Daniel...Thank you so much! Yes now it works fine :)

Sign In or Register to comment.