Accepting a mouse click only within a ROI? OSweb version.
I am trying to run a task online, and I am not sure if it is possible using OSweb.
It the task, participants click on a screen button before the experiment advances to the next trial. A click outside the button (let's call it ROI) should be ignored.
I implemented a version of the task using python (see here https://forum.cogsci.nl/discussion/6458/accepting-a-mouse-click-only-within-a-roi)
But this method cannot be used with OSweb, since there is no way to use functions such as my_mouse.get_click() in java. Please correct me if I am wrong.
So, the task cannot be implemented with java.
@Eduard was kind enough to suggest another method, using the repeat_cycle item.
I implemented his suggestion, and it was successful regarding the desktop version:
In the stim sketchpad I named an element (a box called "box"), and the condition in the repeat_cycle is
[cursor_roi]="".That is, the cycle is repeated unless cursor_roi takes a non-zero value, e.g. the value "box" (or whatever). But, named elements are not supported in OSweb, correct? Although I don't use the "box" value, naming an element causes OSweb to crash.
So, the task cannot be implemented with the repeat_cycle approach either, correct?
I would greatly appreciate your comment, since I am unfortunately thinking about using alternative software.
Can any of you think of another way to implement the "only-accept-a-click-within-a-roi" functionality with OSweb?
Thank you for your time,