PennController for IBEX › Forums › Support › Setting mouse cursor location
Tagged: mouse cursor location
- This topic has 1 reply, 2 voices, and was last updated 1 year, 3 months ago by
Jeremy.
-
AuthorPosts
-
October 27, 2023 at 4:58 am #10926
kuyrukcuoguz
ParticipantHi,
I am working on a categorization experiment where the participants are supposed to choose from one of three categories my a mouse click. At selection, the experiment moves on to the next item automatically. What I would like to do is to implement a “cursor location reset” at each item’s trial, so that the reaction time is not influenced by the mouse cursor being right at the correct choice from the last trial. So, is there a way to set the cursor location for each instance of a trial?
Here is my working template for the trials:
Template("inanimate_Rand_A.csv", row => newTrial("inanimate_items", //newText("categoryText", "Select a category:") // .css({ "font-size": "1.2em" }) // .print(), newImage("instruments.PNG") .size(175,200), newImage("clothes.PNG") .size(175,200), newImage("transport.PNG") .size(175,200), newCanvas("categories", 800, 600) .add(-100, 20, getImage("instruments.PNG")) .add(250, 20, getImage("clothes.PNG")) .add(600, 20, getImage("transport.PNG")) .add(-50, 250, newImage("singular", row.Image_Name) .size(750, 500) .center() ) .center() .print(), newSelector() .add(getImage("instruments.PNG")) .add(getImage("clothes.PNG")) .add(getImage("transport.PNG")) //.shuffle() .wait() .log() ) .log("item", row.Stimulus_Engl) .log("item_Ger", row.Stimulus) .log("item_Ger_raw", row.Stimulus_raw) .log("category", row.Category) .log("typicality", row.Typicality) .log("typicality_rating", row.Typicality_rating) .log("familiarity", row.Familiarity_rating) .log("aoa", row.AoA_rating) .log("log_frequency", row.logFreq_WebXL_lemma) );
December 5, 2023 at 5:35 am #10969Jeremy
KeymasterHi,
It’s impossible to control the cursor’s location in javascript, for security reasons. What you can do is print a button at the center of the page (
newButton("Next").print("center at 50vw", "middle at 50vh").wait()
) and only start the trial when it’s clicked: this way when the trial starts the participant’s cursor is centered on the pageJeremy
-
AuthorPosts
- You must be logged in to reply to this topic.