[solved] canvas.image and Setting Mouse Position
I am creating an experiment in which participants see a set of four pictures while hearing instructions to place a red or a blue square above or below some of the pictures via mouse clicks. I have a working experiment, but some of the details are not quite right. I can display the mouse and collect the clicks with no problem, but I don't see a way to set the mouse cursor starting location on each trial to the center of the display. I tried using the pygame function mouse.set_pos([x,y]), but get the following error:
experiment.run(): experiment started at Tue Jul 10 08:26:51 2012 Traceback (most recent call last): File "libopensesame\inline_script.pyo", line 121, in run File "", line 4, in AttributeError: legacy instance has no attribute 'set_pos'
I really need the mouse to start from the same position on every trial. Is there a way to do this?
Also, to make this work I had to display the images via canvas.image() because in order to get the mouse cursor (I'm using canvas.arrow) to refresh I have to use canvas.clear(), which if I understand correctly, also clears any images I've display via a sketchpad. As far as I can tell, the canvas.image() function requires an absolute file path and does not use the file pool. Have I misunderstood this? Do you have any suggestions about how I might avoid the absolute path so I can move this between machines without changing the path?