This sample experiment illustrates how to continuously log mouse coordinates.
A 'TextDisplay' object is presented and the subject is asked to estimate the location of a previous stimulus. The TextDisplay is configured with a '0' Duration so that InLine script will execute during the object.
The InLine script contains a loop that will run until a response is received. Inside the loop, the current time is constantly monitored. Every 25ms, the mouse coordinates are logged as attributes, along with a timestamp. Once a response is made, the response coordinates are logged.
Afterwards, the attributes created are used to present a replay of the subject's path. A 'Canvas' object is used to draw a circle representing each set of coordinates logged. An outlined circle is drawn at the end of the replay to indicate the response coordinates. The subject can skip this replay by pressing the left mouse button.