![]() Because of this, I need to keep dumping past clicks so that simple movement by the mouse does not trigger a button press. The buttons argument returned by the getPressed method does not seem to register a single taps on the touch screen, even though a time is recorded. My concern is the code seems like a hack. If you touch the screen, a click is recorded and the position is checked. If you are just moving around the mouse, nothing happens since there is no response click. If a response click time has been recorded and the mouse is in rec, then the routine moves on. ![]() If mytimes > 0.0 and rec.contains(mouse): The psychopy file is attached here and again thanks a lot for your follow-ups. I’ve updated PsychoPy to 2022.1.1 but things still go wrong. I am currently using mybuttons, mytimes = mouse.getPressed(getTime = True) yeah the experiment is running locally, and thanks for your suggestion because now I can make sure that the problem is with the button and not with the sound. The problem is if the subject uses the mouse and moves through rec on the way to rec2, the code thinks button rec has been pushed. If the subject touches the screen on rec, the code triggers and everything is perfect. That code, as I understand it, is not looking for mouse clicks or touches, but rather only if the mouse is in rec. If mouseloc=mouserec and mouseloc=mouserec: I looked at a snippet of your code from one of your google docs. URL of experiment: Pavlovia Description of the problem: I am trying to format a series of buttons on a PsychoPy task so that they are properly presented on the Pavlovia online version of the same task. ![]() The button component, without any code, allows subjects to single click them with the mouse or to double tap them on the touch screen. I have a bunch of buttons and I want subjects to be able to both single click on them with the mouse or touch them on the touch screen. I really would appreciate, if someone had a clue.Reading what I posted, I don’t think I explained my issue well. Really, I am desperate!! No one around me is into PsychoPy oder Python, and though I tried a few things, I don't even really get the error message. TypeError: 'NoneType' object has no attribute '_getitem_' If self.prevPos self.lastPos: return True For days I am getting the following error message:įile "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.83.01-py2.7.egg\psychopy\event.py", line 421, in mouseMoved I tried to make up the biggest parts of the experiment within the builder view and then to insert the "mouseMoved"solution by Lily in a code component. I am still facing the same problem as you described here (trying to run an experiment on a windows tablet, wanting to measure reaction times for decisions indicated via touches on the tablet (and also the position of the touch has to be recorded) but only double-clicks get counted).Įven worse: I am a total beginner with Python. Sorry for bothering you, though all these initiaI posts are a little older. I tried 1,000,000 things, including every possible strategy one could think of for changing this feature on the surface itself. There is something different between the touch aspect and the mouse. The mouse itself, however, will trigger mouse.getPressed() on a single click. mouse.getPressed() just returns unless there is a double click. For some reason the surface touch was different (I suspect because of the multi-touch features / windows 8/ being possessed). ![]() I typically use an Elo Touch screen and that has always responded like a regular mouse (as if the computer didn't know any difference), so this was completely baffling for me. For some reason it always waited for double-clicks instead of the single-click, which I needed for reaction time. ![]() The "mouseMoved" solution provided by Lily is very clever and also worked for me! I was having difficulty getting a microsoft surface (touch screen) to register mouse-clicks. I just wanted to reply to this thread so that other people who are searching for specific solutions might find answers more effectively. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |