Centering mouse cursor at the start of the trial

PennController for IBEX Forums Support Centering mouse cursor at the start of the trial

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5104
    rhododendron
    Participant

    Hi Jeremy,

    I was wondering if it is possible at all to center the position of the mouse cursor at the beginning of a picture selection task and before the pictures are presented. The idea would to set the mouse cursor in the center and equidistant in relation to each presented picture such that mouse movement can be comparable across trials (the trials contain either 2, 3 , 4 or 5 pictures per canvas).

    Thank you so much in advance!

    Best wishes,
    Ana-Maria

    #5107
    Jeremy
    Keymaster

    Hi Ana-Maria,

    The script cannot take control of the mouse for security reasons, but what you can do is print a small button where you want the mouse to be and reveal your pictures only after it is clicked, for example:

    newButton("Start").print("center at 50vw","middle at 50vh").wait().remove()
    ,
    newSelector("image")
    ,
    defaultImage.size(200,200).selector("image")
    ,
    newImage("topleft.png").print("right at 45vw","bottom at 45vh"),
    newImage("topright.png").print("left at 55vw","bottom at 45vh"),
    newImage("bottomleft.png").print("right at 45vw","top at 55vh"),
    newImage("bottomright.png").print("left at 55vw","top at 55vh")
    ,
    getSelector("image").wait()

    Jeremy

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.