Switching parts of the code included for eye-tracker ON and OFF using a variable


Switching parts of the code included for eye-tracker ON and OFF using...
Author
Message
nidhi_desai
nidhi_desai
Partner Member (566 reputation)Partner Member (566 reputation)Partner Member (566 reputation)Partner Member (566 reputation)Partner Member (566 reputation)Partner Member (566 reputation)Partner Member (566 reputation)Partner Member (566 reputation)Partner Member (566 reputation)
Group: Forum Members
Posts: 42, Visits: 287
I am looking to record eye-tracking with my behavioral experiment. But as I debug the code when I am not connected to a computer with eye-tracker setup, I need a method for switching the parts of my codes related to eye-tracker OFF using a variable values.includeEyetracker = 1 or 0. Is there a way to do this, since the markers that I send to eye-tracker are ports that are added as stimuli in the corresponding trials?  

My idea for solving this problem was to have a separate file with the eye-tracker setup which includes the ports for markers to be sent to eye-tracker and using <include> and insertstimulusframe insert these into the main trials. But the issue is that I need the eye-tracker port to dynamically change its value as the experiment is run. I saw the example on Inquisit of building a dynamic marker and then doing setitem. If I do this the main code gives an error when values include.Eyetracker is set to 0 and the other file where the eyetracker setup and ports were defined is not included. So the main code does not find the port which the code would setitem only if values.includeEyetracker = 1. Is there a work around this? Or any other method of having switch in the code to turn the codes for eye-tracker on or off. 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search