Alisdair Tullo has put together a collection of code that you might find useful for your research projects. It covers E-Prime, OpenSesame/OSWeb, Python (including PsychoPy), Java and JavaScript. Links to this and many more coding resources can be found in “Data Collection and Coding” on SharePoint.