[open] start position of a window
Hi all,
I want to present my experiment window on the particular coordinates rather than on the center of a monitor while the program is running in window. I use Psychopy backend. How can I define the default coordinates?
Apologies if this has been asked before. I had a search around but I couldn't find an answer.
Thanks in advance.
Reiko
Comments
Hi Reiko,
Sorry for the late reply. Regarding your question, there is no nice an clean way of specifying the default coordinates where to present the window. However, if you are willing to tweak the source code of Opensesame a bit, you might be able to get what you need.
As a disclaimer, I did not test, whether adding the changes that I will suggest now, will have other effects than the desired (I don't see a reason why it should, though). So, use it with care! Also, the changes are permanent in a way, that you can't choose the default coordinates during an experiment, that is, if you want to change the default position, you have to close Opensesame, and change the source code again.
Alright, here is what you need to do:
The important file, you need to change is "openexp/_canvas/psycho.py", which is located in the Opensesame installation. If you open the file, you have to go to line 351. Currently, there should be this code:
experiment.window = visual.Window(experiment.resolution(),in the functioninit_display()If not, try to locate it. Once you found it, simply add
pos = (x,y),to this line (Mind the comma in the end!). x and y represent the default coordinates you wish your window to open at. As far as I know, psychopy uses (0,0) to demarcate the center of the screen. So from this information, change x and y according to your needs.Does this make sense to you? Let me know if things worked out.
Good luck,
Eduard