| Reference | Downloads | Github

CustomMouse setLimit problem

Hi there,

I am trying to write a code using coder that the test subjects can use to rate their pain on an x-y scale. This requires making a CustomMouse with the symbol “+” and limiting its range to the outer edges of the scale. The subject should then be able to click in the scale and their response should be recorded. I have been able to get everything to work except that the cursor gets “stuck” randomly in the scale. I believe this is related to the position of the actual cursor at the beginning of the routine but couldn’t find a way to initialize its position. To solve this, the subject would have to move their cursor to the outer edge of the scale and then continue scrolling (even though this won’t show) in order for the cursor to be able to move past where it was previously “stuck.” Every other component of the code works as the data is properly stored regardless of the described problem. I have attached two versions of the code. The first includes a builder mouse component that is used to create the cursor while the other simply uses a CustomMouse component. Both codes work the same the only difference being the appearance of the trial routine. Thanks in advance for any help! (17.0 KB) (15.7 KB)