If hasattr(thisComponent, “setAutoDraw”): If continueRoutine: # don't flip if this routine is over or we'll get a blank screen If hasattr(thisComponent, "status") and thisComponent.status != FINISHED:īreak # at least one component has not yet finished If not continueRoutine: # a component has requested a forced-end of RoutineĬontinueRoutine = False # will revert to True if at least one component still running If endExpNow or defaultKeyboard.getKeys(keyList=): ThisExp.timestampOnFlip(win, 'imagenemo.started') Win.timeOnFlip(imagenemo, 'tStartRefresh') # time at next scr refresh Imagenemo.tStartRefresh = tThisFlipGlobal # on global time Imagenemo.tStart = t # local t and not account for scr refresh If imagenemo.status = NOT_STARTED and tThisFlip >= 0.0-frameTolerance: (())ĬontinueRoutine = False # abort routine on response # check if the mouse was inside our 'clickable' objects If sum(buttons) > 0: # state changed to a new click If buttons != prevButtonState: # button state changed? If mouseja.status = STARTED: # only update if started and not finished! PrevButtonState = mouseja.getPressed() # if button is down already this ISN'T a new click Win.timeOnFlip(mouseja, 'tStartRefresh') # time at next scr refresh Mouseja.tStartRefresh = tThisFlipGlobal # on global time Mouseja.tStart = t # local t and not account for scr refresh If mouseja.status = NOT_STARTED and t >= 0.0-frameTolerance: ThisExp.timestampOnFlip(win, 'imageja.started') Win.timeOnFlip(imageja, 'tStartRefresh') # time at next scr refresh Imageja.tStartRefresh = tThisFlipGlobal # on global time Imageja.tStart = t # local t and not account for scr refresh If imageja.status = NOT_STARTED and tThisFlip >= 0.0-frameTolerance: ThisExp.timestampOnFlip(win, 'textstartmessage.started') Win.timeOnFlip(textstartmessage, 'tStartRefresh') # time at next scr refresh Textstartmessage.tStartRefresh = tThisFlipGlobal # on global time Textstartmessage.tStart = t # local t and not account for scr refresh # keep track of start time/frame for later If textstartmessage.status = NOT_STARTED and tThisFlip >= 0.0-frameTolerance: # update/draw components on each frame # *textstartmessage* updates TThisFlipGlobal = win.getFutureFlipTime(clock=None)įrameN = frameN + 1 # number of completed frames (so 0 is the first frame) TThisFlip = win.getFutureFlipTime(clock=routineTimer) _timeToFirstFrame = win.getFutureFlipTime(clock=“now”)įrameN = -1 - Run Routine “startbildschirm”. ThisComponent.status = NOT_STARTED reset timers StartbildschirmComponents = įor thisComponent in startbildschirmComponents: GotValidClick = False # until a click is received keep track of which components have finished RoutineForceEnded = False update component parameters for each repeat setup some python lists for storing info about the mouseja Thanks in advance - Prepare to start Routine “startbildschirm”. Let me know, if any important information is missing that would be needed to get help here Could you tell me which commands i have to use and where to put them into the code? It would be really great if anyone could help me.Īs i don’t have a lot of experience with coding, i tried to copy the important part from my code (you will find that below). I already read some posts (see below) that describe the same problem but unfortunately their solutions did not work out for me (PsychoPy stopped with exit code 1 or the slider was not clickable anymore). I would prefer that a single tap would be enough. The problem is that at the moment the kid would have to double tap in order to give the answer. In the task there is a line (slider) shown from 0 to 10 or 100 and the kid has to guess the position of a certain number within this line. I used PsychoPy to do a number line estimation task for children using a touch laptop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |