Howdy, Stranger!

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

Supported by

cursor_roi does not exist

Hello everyone,

I am programming a memory game experiment for a tablet. I want to show three squares on a screen (one on top, two underneath). Then I want one of the bottom cards to display a visual stimulus (ie. apple), next I want the other bottom square to display another visual stimulus (ie. spoon), lastly the card on top should display either an apple or a spoon. To be clear this final sketch pad will have two identical blue squares on the bottom (as if these cards have been flipped over) and one card on top that displays a visual stimulus that matches one of the previously presented images (ie. apple or spoon). The participant should click on either the right or the left blue square based on what has previously been presented. I have this basic part running well in open sesame. I have named the two blue squares and open sesame logs which stimuli were displayed and which square was clicked on. The trouble is when I try to define the correct variable it tells me "cursor_roi" does not exist. Does anyone have any idea how to help me? Thank you so much in advance


  • Hi Mollie,

    It's difficult to tell without actually seeing the experiment script, but two possibilities come to mind:

    • You're running an older version of OpenSesame (≤ 3.1), in which this functionality wasn't yet available.
    • You're trying to set the correct variable before the user has actually given a response, and hence the cursor_roi variable hasn't yet been defined. For example, are you trying to do this in the Prepare rather than Run phase of an inline_script?


  • Hi Sebastian!

    Thank you so much! I am trying to do it in prepare so that is probably the issue!! Thank you so much for your quick response.


  • Hi Sebastian!

    Thanks so much again for your previous help! The experiment is working great and I have it running on the tablet too! I have a quick question. I would like to make sure that the correct answer (or the match) does not end up on the same side more than twice in a row. I have attached a picture of my table and how I have defined correct.

    Also, on the linked sketchpad which is the picture of the two bottom "cards" turned over and the top card revealed I have named the two cards "target_l" (meaning the square on the left) and 'target_r' (meaning the square on the right). Any insight you might have for me regarding this would be greatly appreciated. Thanks so much!

  • My experiment is similar and I was having a similar problem. I tried your fix, but all I get is a syntax error. I have a target picture and then 4 pictures along the bottom (emotion1, emotion2, emotion3, emotion4) which is selected by mouse response. I need it to run as a series of "if" statements such that if [emotion1] matches the target emotion and is selected by the
    participant, then it is marked correct, or if [emotion2] matches the target emotion and is selected by the participant, then it is marked correct, etc. But I can't figure out how to get this to work. I've tried

    if var.emotion1=='angry' and var.cursor_roi=='emotion1' or var.emotion2=='angry' and var.cursor_roi=='emotion2' or var.emotion3=='angry' and var.cursor_roi=='emotion3' or var.emotion4=='angry' and var.cursor_roi=='emotion4'

    I've also tried
    if and var.cursor_roi=='emotion1' or and var.cursor_roi=='emotion2' or var.emotion3==[target] and var.cursor_roi=='emotion3' or var.emotion4==[target]' and var.cursor_roi=='emotion4'

    The error I get is:
    item-stack: experiment[run].practice_loop[run].practice_sequence[prepare].anger_script_1[prepare]
    exception type: SyntaxError
    exception message: Failed to compile inline script
    item: anger_script_1
    code: if and var.cursor_roi=='emotion1' or and var.cursor_roi=='emotion2' or var.emotion3==[target] and var.cursor_roi=='emotion3' or var.emotion4==[target]' and var.cursor_roi=='emotion4'
    time: Thu Jan 24 18:02:29 2019
    phase: run
    line: 1

    I've also tried some other variations based on documents on open sesame. This one will mark emotion 1 as correct, but I can't get it to run with "or" statements between them.

    if self.get('emotion1') == 'angry':
    exp.set('correct_response', 1)
    if self.get('emotion2') == 'angry':
    exp.set('correct_response', 1)
    if self.get('emotion3') == 'angry':
    exp.set('correct_response', 1)
    if self.get('emotion4') == 'angry':
    exp.set('correct_response', 1)
    exp.set('correct_response', 0)

    Any ideas? I'm really struggling on this and programming is not one of my strengths!

  • Hi! I got my code to run exactly how I wanted it to using this code here:
    if and var.cursor_roi=='target_l'or and var.cursor_roi=='target_r':
    In your script I see a quotation mark after target that I don't think should be there. You are getting a syntax error so maybe that's it?

    **[target]' **and var.cursor_roi=='emotion4'

    Let me know! I'm a newbie programmer as well... I just happened to notice that!

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