Howdy, Stranger!

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

Supported by

Too many mouse clicks required for mouse response

edited November 2017 in OpenSesame

Hello,

I have a problem with my experiment.
I need to press the mouse button 1 three times - only after three times it moves to the next trial.
Before I wrote this code below on python inline script - one click was enough. Please if you have a suggestion I would like to hear.
I wrote this code on the run stage and the prepare stage.
if I erase it from prepare stage it still requires two clicks.

my_mouse = mouse()
button, (x, y), timestamp = my_mouse.get_click(timeout=99000)
if button is None:
    print('A timeout occurred!') 

Comments

  • Hi Matanel,

    You should include this code only in the Run phase. If you then still need multiple mouse clicks, this is because there is some other item that collects a mouse click as well. Did you set any sketchpad durations to 'mouselick', or insert a mouse_response item somewhere?

    Cheers,
    Sebastiaan

  • Oh shit. I haven't actually sent my response. Well, for completeness sake:


    Without seeing the rest of your experiment, it is hard to say what is going on, but somewhere in your code or in your structure, you wait for another mouse click. Maybe it is in the code, maybe it is with a mouse response item.

    Again, if you want to have a clear diagnosis, we need more infromation.

    Eduard

    Buy Me A Coffee

  • Thanks guys, but I didn't set any sketchpad durations to 'mouselick', or insert a mouse_response item somewhere.
    I attach my experiment file - can you open it ?

  • You don"t need to add a mouse response item if you use inline_scripts to sample a mouse response (or the other way around). So delete whichever you don't need, (probably the mouse response item).

    Eduard

    Buy Me A Coffee

  • edited November 2017

    Thanks a lot Eduard now I realy need only one click.

    But now I am stuck - can't make the cursor visible - I tried this code:
    mouse.show_cursor(show=True)

    and also this :
    my_mouse.show_cursor(show=True)

    but still the cursor doesn't appear on the sketch-pad like the mouse_response is doing.

    I tryied to manage the back end settings like sabastian is suggesting here:
    http://forum.cogsci.nl/index.php?p=/discussion/1202/solved-mouse-cursor-not-visible-in-full-screen-mode

    One solution is to **not ** write in the inline script
    my_mouse = mouse()
    button, (x, y), timestamp = my_mouse.get_click(timeout=99)

    but if I use the mouse response I can only use the var.cursor_x - but the problem with this variable is that
    I can't do any manipulations on the output x of the click.

    and another problem with this variable is that it gives me different x coordinates from my_mouse.get_click

    Thanks for your patience .

  • Hi,
    Instead of show_cursor(show=True) try, set_visible(show=True)

    Eduard

    Buy Me A Coffee

  • edited December 2017

    Not working.
    show_cursor(show=True) - works as for about a second that I press the mouse and then disappears.
    I am thinking about drawing a sketchpad in the inline script. Do you think it may solve this?
    Do you have some recommendation for how to do it?

  • Hi matanel,

    Could you please upload your experiment? I think, I could help you quicker like that.

    eduard

    Buy Me A Coffee

  • Hi guys,

    I realise this is an old discussion but I wonder if this problem has been solved and how? I am currently having problems with my mouse cursor not being at all visible during the experiment (the "visible mouse cursor" box is checked).

    Thanks!

    Marta

  • Hi @m.vel ,

    The 'Visible mouse cursor' option applies only to the moment during which the mouse response is being collected. If you want to show the cursor all the time, then you can use the following code in an inline_script :

    Mouse().show_cursor()
    

    See also:

    Cheers!

    Sebastiaan

  • Hi Sebastiaan, thank you for the quick reply!

    I don't necessarily need the mouse cursor visible at all time. My main issue is that it is not visible during the response collection and I am worried that this will be very confusing for my participants, especially the child group.

    The visible mouse cursor is selected for all my mouse responses, but the cursor is never visible. Do you have any insight on why could that be?

    Marta

  • edited September 2020

    Hi again,

    I have also tried putting the code you suggested in the inline script of each of my sketchpads, I click apply, but it doesn't stay there. The next time I go check the inline script of that sketchpad, that piece of code is simply not there.

    Should the code be inserted in a specific location fo the inline script of the sketchpad? I tired the beginning and the end; this is an example of the inline script of my typical sketchpad:

    set duration 500
    set description "Displays stimuli"
    draw image center=1 file="[Img5]" scale=1 show_if="[Img5] != '/'" x=0 y=0 z_index=0
    

    The inline script of the mouse response is the following, so the cursor should be visible:

    set timeout 0
    set show_cursor yes
    set linked_sketchpad ready_practice
    set flush yes
    set event_type mouseclick
    set duration mouseclick
    set description "Collects mouse responses"
    

    Marta

  • Hi @m.vel ,

    The sketchpad doesn't support this option, so that's why it's stripped from the script. For the mouse_response , one thing that strikes me is that you have set the timeout to 0. This means that no response will be collected at all, and hence the cursor will never be shown. Could that simply be the problem? If you set the timeout to 'infinite', does the cursor appear?

    — Sebastiaan

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