Howdy, Stranger!

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

Supported by

Drag and drop; Mouse trap; Back-end

Hello,

I'm trying to use the mouse trap function in my experiment that is based on drag and dropping some stimulus on a horizzontal line. I entirely defined the task with python script without using any opensesame integrated element. The experiment (build with psychopy backend) works very well. The problem now is related to mousetracking data collection. I realyzed that there is no compatibility between psychopy and mousetrap. So, as i change the backend in legacy or xpyriment the logic i wrote for the drag and drop doesnt' works anymore as it doesnt' fits well with legacy or xpyriment.

Do you have any suggestion on how resolve this problem?

Kind regards,

Lorenzo

Comments

  • Hi Lorenzo,

    I assume that even if you rewrite your code so it works with legacy or expyriment, mousetrap won't be of much help as the tracking of the cursor coordinates using mousetrap functionality will likely not work in parallel with your custom drag and drop implementation.

    However, since you have already written the complete drag and drop functionality, I would assume that you only need to add a bit of extra code to record the cursor coordinates. Essentially it just involves setting up empty lists for timestamps, x- and y-positions first and then using the mouse.get_click function with a fixed small timeout (the logging interval) to collect the cursor coordinates and append them to the lists. You can see how this is implemented for mousetrap here (this code contains much more additional functionality which you likely not need in your case): https://github.com/PascalKieslich/mousetrap-os/blob/master/plugins/mousetrap_response/PyMT_response/__init__.py

    I assume that you already continuously collect the coordinates in the drag and drop part so for this part you likely only need to store the coordinates in the lists.

    Best regards,

    Pascal

  • Dear Pascal,

    first of all thank you for your suggestions and help. I tried to set up the lists but the problem is that i can't effectively register the tracking data, later in the output. In the drag and drop i used the function my_mouse.get_click but obviously wasn't able to record correctly the coordinates. As i try to change and use the my_mouse.get_pos i always have problem of definition of x and y coordinates where the "string indices must be integers, not 'str'". Moreover, by using get_pos, i'm not able anymore to move the stimulus.

    Kind regards,

    Lorenzo

  • Dear Lorenzo,

    sorry, I am not sure whether I understand your problem in detail. One thing that could be of interest is that since OpenSesame 4.0.0, lists are not logged anymore (but you can still handle and store them as normal Python variables - however, when you want to log them, you need to convert them to strings) - see the following change in one of the mousetrap example experiments here: https://github.com/PascalKieslich/mousetrap-os/commit/5cbecaaffe61d8ea338e6ce59aebd13efd900061 and the OpenSesame change note here: https://osdoc.cogsci.nl/4.0/notes/400/#important-backwards-incompatible-changes

    Best regards,

    Pascal

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