Welcome! Log In Create A New Profile

Advanced

Stop acquiring fixation

Posted by Leonardo 
Stop acquiring fixation
December 19, 2019 04:18PM
Hi,
I'm having issues with some monkeylogic functions

I'm trying to set the trial in this way:

CT=1;
SD=2;

wait_for_touch= 5000
holding_CT=500;

fix_radius=2.5

idle(1000);
toggleobject(CT, 'Status', 'on');
idle(1000);
ontarget = eyejoytrack('touchtarget', CT, fix_radius, wait_for_touch);

stop_acquisition=eyejoytrack('~releasetarget', CT, fix_radius, 1000);
spacebar= hotkey('space', 'stop_acquisition');

if ontarget
idle(1000);
toggleobject(SD,'Status','on');
idle(1000);
if spacebar;
trialerror(6);
end
return
end


When I try to run it, it tells me that I gave to many output or that there is an undefined function 'ml_source'.
How can I solve this problem?
Which other function can I use to do so that if I touch the spacebar the program stops to acquire fixation?

Thank you
Re: Stop acquiring fixation
December 19, 2019 05:02PM
The hotkey function does not return anything.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#hotkey

And see this for how to stop eyejoytrack on purpose.
https://monkeylogic.nimh.nih.gov/board/read.php?2,202,202#msg-202

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.