auto response mode doesn't work anymore
Hi and a happy new year to all of you!
For some reason the auto response mode doesn't work for me anymore. It's been some time since I last used it, so i can't tell since when it stopped working.
Problem occurs with different experiments and in all three "Run" modes.
Any ideas? I am designing a new experiment, which needs some testing. I'd kill (or finally translate missing .md's to German
) for auto response mode...
Best,
timo
System
System: Windows
Architecture: 32bit
Modules and packages
OpenSesame 3.1.4
Python 2.7.12 |Continuum Analytics, Inc.| (default, Jun 29 2016, 11:42:13) [MSC v.1500 32 bit (Intel)]
QProgEdit 4.0.6
datamatrix 0.3.1
qdatamatrix 0.1.9
pseudorandom 0.2.2
fileinspector 1.0.2
QNotifications 1.1.1
QOpenScienceFramework 1.1.8
opencv [not available]
expyriment 0.8.1.opensesame2
IPython 4.2.0
numpy 1.11.1
scipy 0.17.1
PIL/ PILLOW 1.1.7
psychopy 1.82.01
pygame 1.9.2a0
pygaze 0.6.0a21
pyglet 1.2.4
PyQt 4.11.4
serial 2.7
markdown 2.6.6
bidi 0.4.0
yaml 3.11

Comments
Hi Timo,
Right, auto-response has been removed in 3.1. This release included a reworked way to handle responses, and the old (awful) implementation of auto-responses was removed as a part of this. I do want to re-introduce this in the 3.2 series though. But for the immediate future, all I can promise is that I will remove the defunct menu item!
For now, you can monkey-patch the keyboard class to return a dummy response ('a') right away by putting the following code in the prepare phase of an
inline_scriptat the start of the experiment (replacelegacyby the backend that you're using):And now get translating!
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi timo and sebastiaan,
Does this mean that, with that code I can "fake" a keyboard response and get a sketchpad to end (that has been set to "keypress"), without having to press any actual key?
Regards,
Javi
Hi Javi,
Yes, it does. It basically overrides the real
keyboard.get_key()with a custom function that simulates an immediate key press.Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks sebastiaan!
This will be very useful for me. However, i'm having problems getting it to work.
On one hand, OpenSesame doesn't recognize the module "xpyriment" when I use the same code you posted but with Xpyriment:
On the other hand, I'm not entirely sure how to trigger this dummy response. Could it be something like this or does it work in another way?
Thanks a lot for your help!
Regards
Javi
Thanks again, Sebastiaan!!!
My word is my bond!
Ow right: The xpyriment backend actually uses the legacy keyboard backend. Each backend is a predetermined combination of a canvas backend, keyboard backend, etc. If you click on backend settings in the General Properties tab, you will see which backends are actually used.
You don't need to trigger it: That's the idea of auto-response! The only thing that you need to do is add this code to your experiment.
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks a lot sebastiaan! I wonder if there could be any way to customize this auto-response. I'd like to only use this auto-response in a specific loop and not in the whole experiment and, if posible, only apply the auto-response in specific cases and not with all keyboard_responses.
If I try to put the inline script in a given loop it only works from that loop on, but I don't know how to stop it for the other loops and trials of the experiment.
I'm sorry if all this has a very simple answer, but I'm still kind of new to programming.
Regards
Javi
Hi Javi,
You can re-enable responses by restoring the original
get_key()function. So if you use this script to enable auto responses:Then you can use this script to revert back to normal responses:
Do you see the logic?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thank you very much Sebastiaan!
Yes, I see the logic and it works like a charm!
Regards
Javi