b@0: function PCpush(hf,but) b@0: b@0: dat=get(hf,'userdata'); b@0: noComb=dat.noComb; b@0: comb=dat.comb; b@0: ha=dat.ha; b@0: hb=dat.hb; b@0: butCol=dat.butCol; b@0: b@0: switch but b@0: case 1 % A b@0: set(ha,'backgroundcolor','r'); b@0: set(hb,'backgroundcolor',butCol); b@2: fidInd=['responses/' dat.sesDat.id,'_',dat.sesDat.sesScript]; %print 'A' b@0: fid=fopen(fidInd,'a'); b@0: fprintf(fid,'A'); b@0: playSound(dat.sesDat.cuSndList(comb(noComb,1))); b@2: case 2 % Stop () b@2: audioplayer(0,1); b@0: case 3 % B b@0: set(hb,'backgroundcolor','r'); b@0: set(ha,'backgroundcolor',butCol); b@2: fidInd=['responses/' dat.sesDat.id,'_',dat.sesDat.sesScript];%print 'B' b@0: fid=fopen(fidInd,'a'); b@0: fprintf(fid,'B'); b@0: playSound(dat.sesDat.cuSndList(comb(noComb,2))); b@0: end